.
This commit is contained in:
+7
-10
@@ -115,17 +115,9 @@ class Long(models.Model):
|
||||
authors = ", ".join([i.username for i in self.author.all()])
|
||||
return authors
|
||||
|
||||
def get_examinations(self):
|
||||
"""Returns a comma seperated text list of regions"""
|
||||
examinations = ", ".join([i.examination for i in self.examination.all()])
|
||||
return examinations
|
||||
|
||||
def __str__(self):
|
||||
exams = self.get_examinations()
|
||||
lat = ""
|
||||
if self.laterality != "NONE":
|
||||
lat = self.laterality
|
||||
return "{} / {} {}".format(exams, lat, n)
|
||||
examinations = [series.get_examinations() for series in self.series]
|
||||
return "{} : {}".format(self.history, ", ".join(examinations))
|
||||
|
||||
def GetExams(self):
|
||||
e = self.exams.all().values_list("name", flat=True)
|
||||
@@ -160,6 +152,11 @@ class LongSeries(models.Model):
|
||||
long = models.ForeignKey("Long", related_name="long", on_delete=models.SET_NULL, null=True)
|
||||
description = models.TextField(blank=True, help_text="Description of stack, for admin organisation")
|
||||
|
||||
def get_examinations(self):
|
||||
"""Returns a comma seperated text list of regions"""
|
||||
examinations = ", ".join([i.examination for i in self.examination.all()])
|
||||
return examinations
|
||||
|
||||
#class LongImage(models.Model):
|
||||
# long = models.ForeignKey(Long,
|
||||
# related_name="images",
|
||||
|
||||
Reference in New Issue
Block a user