This commit is contained in:
Ross
2021-10-02 15:58:45 +01:00
parent fc09097958
commit 686fb2bd35
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -1,3 +1,4 @@
import json
from django.contrib.contenttypes.fields import GenericRelation
from django.db import models
from django.utils import timezone
@@ -256,6 +257,15 @@ class AnatomyQuestion(models.Model):
return json
def get_image_url(self):
return "https://www.penracourses.org.uk{}".format(self.image.url)
def get_image_url_array(self):
return json.dumps(["https://www.penracourses.org.uk{}".format(self.image.url)])
def get_image_annotations(self):
return json.dumps([self.image_annotations])
@reversion.register
class Answer(models.Model):