.
This commit is contained in:
+16
-20
@@ -17,6 +17,9 @@ from sortedm2m.fields import SortedManyToManyField
|
||||
|
||||
import string
|
||||
|
||||
|
||||
from generic.models import Examination, Site, Condition, Sign
|
||||
|
||||
image_storage = FileSystemStorage(
|
||||
# Physical file location ROOT
|
||||
location=u"{0}/rapids/".format(settings.MEDIA_ROOT),
|
||||
@@ -65,15 +68,6 @@ class Examination(models.Model):
|
||||
class Meta:
|
||||
ordering = ('examination', )
|
||||
|
||||
|
||||
class Site(models.Model):
|
||||
site = models.CharField(max_length=200)
|
||||
initials = models.CharField(max_length=200)
|
||||
|
||||
def __str__(self):
|
||||
return self.site
|
||||
|
||||
|
||||
class Condition(tagulous.models.TagModel):
|
||||
pass
|
||||
|
||||
@@ -163,12 +157,13 @@ class Rapid(models.Model):
|
||||
# to=Sign, blank=True, help_text='Radiological signs in the question')
|
||||
|
||||
DEFAULT_SITE_ID = 1
|
||||
site = models.ManyToManyField(
|
||||
Site,
|
||||
blank=True,
|
||||
default=DEFAULT_SITE_ID,
|
||||
help_text=
|
||||
"If we know the source of the image")
|
||||
#site = models.ManyToManyField(
|
||||
# Site,
|
||||
# related_name="site_rapid",
|
||||
# blank=True,
|
||||
# default=DEFAULT_SITE_ID,
|
||||
# help_text=
|
||||
# "If we know the source of the image")
|
||||
verified = models.BooleanField(default=False)
|
||||
created_date = models.DateTimeField(default=timezone.now)
|
||||
published_date = models.DateTimeField(blank=True, null=True)
|
||||
@@ -342,11 +337,12 @@ class RapidCreationDefault(models.Model):
|
||||
related_name="rapid_default",
|
||||
on_delete=models.CASCADE)
|
||||
|
||||
site = models.ManyToManyField(
|
||||
Site,
|
||||
blank=True,
|
||||
default=1,
|
||||
help_text="Default site to use when creating a new rapid")
|
||||
#site = models.ManyToManyField(
|
||||
# Site,
|
||||
# related_name="site_rapid_creation_default",
|
||||
# blank=True,
|
||||
# default=1,
|
||||
# help_text="Default site to use when creating a new rapid")
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse('rapids:rapid_create')
|
||||
|
||||
Reference in New Issue
Block a user