mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2025-12-27 04:00:48 -05:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f08815482 | ||
|
|
6c0a81a4c5 | ||
|
|
9179bde8f9 |
1
cookbook/static/js/bootstrap.min.js.map
Normal file
1
cookbook/static/js/bootstrap.min.js.map
Normal file
File diff suppressed because one or more lines are too long
9
cookbook/static/js/popper.min.js
vendored
9
cookbook/static/js/popper.min.js
vendored
File diff suppressed because one or more lines are too long
1
cookbook/static/js/popper.min.js.map
Normal file
1
cookbook/static/js/popper.min.js.map
Normal file
File diff suppressed because one or more lines are too long
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user