emojis and migrations

This commit is contained in:
vabene1111
2018-05-14 11:31:17 +02:00
parent 8107e46b60
commit 87b7f0d204
20 changed files with 2461 additions and 24 deletions

View File

@ -30,12 +30,11 @@ def batch_monitor(request):
@login_required
def batch_import_all(request):
if request.method == "POST":
imports = RecipeImport.objects.all()
for new_recipe in imports:
recipe = Recipe(name=new_recipe.name, path=new_recipe.path)
recipe.save()
new_recipe.delete()
imports = RecipeImport.objects.all()
for new_recipe in imports:
recipe = Recipe(name=new_recipe.name, path=new_recipe.path)
recipe.save()
new_recipe.delete()
return redirect('list_import')