.
This commit is contained in:
+3
-4
@@ -175,8 +175,7 @@ class Long(models.Model):
|
|||||||
url= "{0}longs/questions/{1}.json".format(settings.MEDIA_URL, question_id)
|
url= "{0}longs/questions/{1}.json".format(settings.MEDIA_URL, question_id)
|
||||||
with open(path, "w+") as f:
|
with open(path, "w+") as f:
|
||||||
|
|
||||||
f.write("""
|
f.write("""{{
|
||||||
{{
|
|
||||||
"title": "{}",
|
"title": "{}",
|
||||||
"image_titles": "{}",
|
"image_titles": "{}",
|
||||||
"type": "long",
|
"type": "long",
|
||||||
@@ -198,8 +197,8 @@ class Long(models.Model):
|
|||||||
# #image_array.append(i.image.url)
|
# #image_array.append(i.image.url)
|
||||||
|
|
||||||
# We are still limited by the size of a series (although this should not be too big or computers will crash...)
|
# We are still limited by the size of a series (although this should not be too big or computers will crash...)
|
||||||
#image_array = [image_as_base64(i.image) for i in series.images.all()]
|
image_array = [image_as_base64(i.image) for i in series.images.all()]
|
||||||
image_array = [i.image.url for i in series.images.all()]
|
#image_array = [i.image.url for i in series.images.all()]
|
||||||
f.write(json.dumps(image_array))
|
f.write(json.dumps(image_array))
|
||||||
#images.append(url)
|
#images.append(url)
|
||||||
if i != len(question_series) - 1:
|
if i != len(question_series) - 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user