.
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user