.
This commit is contained in:
+2
-4
@@ -49,9 +49,6 @@ image_storage = FileSystemStorage(
|
||||
def image_directory_path(instance, filename):
|
||||
return u"longs/picture/{0}".format(filename)
|
||||
|
||||
def question_file_directory_path(instance, filename):
|
||||
return u"longs/question/{0}".format(filename)
|
||||
|
||||
|
||||
def findMiddle(input_list):
|
||||
middle = float(len(input_list)) / 2
|
||||
@@ -173,7 +170,8 @@ class Long(models.Model):
|
||||
q = get_object_or_404(Long, pk=question_id)
|
||||
|
||||
#exam_order.append(q.id)
|
||||
with open(question_file_directory_path(question_id), "w") as f:
|
||||
path=u"{0}longs/questions/{1}".format(settings.MEDIA_ROOT, question_id),
|
||||
with open(path, "w") as f:
|
||||
# Loop through longimage associations
|
||||
f.write("[")
|
||||
images = []
|
||||
|
||||
Reference in New Issue
Block a user