work on json requests
This commit is contained in:
@@ -4,6 +4,8 @@ from django.utils import timezone
|
||||
from django.core.files.storage import FileSystemStorage
|
||||
from django.conf import settings
|
||||
|
||||
from django.urls import reverse
|
||||
|
||||
image_storage = FileSystemStorage(
|
||||
# Physical file location ROOT
|
||||
location=u"{0}/anatomy/".format(settings.MEDIA_ROOT),
|
||||
@@ -176,6 +178,12 @@ class Exam(models.Model):
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
def get_exam_name(self):
|
||||
return self.name
|
||||
|
||||
def get_json_url(self):
|
||||
return reverse('anatomy:exam_json', args=(self.pk,))
|
||||
|
||||
|
||||
class UserAnswer(models.Model):
|
||||
question = models.ForeignKey(AnatomyQuestion,
|
||||
|
||||
Reference in New Issue
Block a user