.
This commit is contained in:
+13
-3
@@ -246,9 +246,19 @@ class Long(models.Model):
|
||||
# #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...)
|
||||
image_array = [image_as_base64(i.image) for i in series.images.all()]
|
||||
#image_array = [i.image.url for i in series.images.all()]
|
||||
f.write(json.dumps(image_array))
|
||||
#image_array = [image_as_base64(i.image) 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('["')
|
||||
|
||||
first = True
|
||||
for i in series.images.all():
|
||||
if not first:
|
||||
f.write(', "')
|
||||
f.write(image_as_base64(i.image))
|
||||
f.write('"')
|
||||
first = False
|
||||
|
||||
#images.append(url)
|
||||
if i != len(question_series) - 1:
|
||||
f.write(",")
|
||||
|
||||
Reference in New Issue
Block a user