furher shorts improvements
This commit is contained in:
+29
-1
@@ -1963,4 +1963,32 @@ class CimarSeriesThumbnail(models.Model):
|
||||
image = models.ImageField(upload_to="cimar_series_thumbnails")
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.series_id}"
|
||||
return f"{self.series_id}"
|
||||
|
||||
|
||||
class FindingBase(models.Model):
|
||||
description = models.TextField(
|
||||
null=True, blank=True, help_text="Findings on the question"
|
||||
)
|
||||
annotation_json = models.TextField(null=True, blank=True)
|
||||
viewport_json = models.TextField(null=True, blank=True)
|
||||
# This has been migrated to install the image id (not index)
|
||||
current_image_id_index = models.TextField(null=True, blank=True)
|
||||
|
||||
# TODO add tags
|
||||
# tags = models.ManyToManyField(Tag, blank=True)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
def __str__(self):
|
||||
return self.description
|
||||
|
||||
def annotation_as_string(self) -> str:
|
||||
return json.dumps(self.annotation_json)
|
||||
|
||||
def get_pretty_annotation_json(self):
|
||||
return get_pretty_json(json.loads(self.annotation_json))
|
||||
|
||||
def get_pretty_viewport_json(self):
|
||||
return get_pretty_json(json.loads(self.viewport_json))
|
||||
Reference in New Issue
Block a user