Compare commits

..

3 Commits
0.8.1 ... 0.8.2

Author SHA1 Message Date
vabene1111
7f08815482 added .map files 2020-06-03 22:40:48 +02:00
vabene1111
6c0a81a4c5 fixed bnroken tooltips and buttons 2020-06-03 22:36:17 +02:00
vabene1111
9179bde8f9 name images with uuid instead of recipe ids
in order to stil be able to manually map images to recipes the name consists of uuid_recipeId.png
2020-06-03 22:09:07 +02:00
4 changed files with 8 additions and 6 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,5 @@
import os
import uuid
from io import BytesIO
import simplejson
@@ -71,7 +72,7 @@ def internal_recipe_update(request, pk):
im_io = BytesIO()
img.save(im_io, 'PNG', quality=70)
recipe.image = File(im_io, name=(str(recipe.pk) + '.png'))
recipe.image = File(im_io, name=f'{uuid.uuid4()}_{recipe.pk}.png')
elif 'image' in form.changed_data and form.cleaned_data['image'] is False:
recipe.image = None