From 3499cb7994ea9f570ccc6d8b1ddb0c30895b2b21 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Thu, 8 Feb 2018 23:29:24 +0100 Subject: [PATCH] cleanup --- .idea/workspace.xml | 61 +++++++++++++++++++++--------------------- cookbook/views/edit.py | 6 ++--- 2 files changed, 34 insertions(+), 33 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 7e5ff0f56..587002da6 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,14 +2,7 @@ - - - - - - - @@ -662,7 +665,7 @@ - + @@ -693,16 +696,6 @@ - - - - - - - - - - @@ -730,7 +723,7 @@ - + @@ -765,13 +758,21 @@ + + + + + + + + + + - - - - - + + + diff --git a/cookbook/views/edit.py b/cookbook/views/edit.py index 0686c96cb..eaac9f306 100644 --- a/cookbook/views/edit.py +++ b/cookbook/views/edit.py @@ -1,8 +1,8 @@ from django.contrib.auth.decorators import login_required from django.shortcuts import redirect, render -from django.urls import reverse +from django.urls import reverse_lazy -from cookbook.forms import RecipeForm, EditRecipeForm +from cookbook.forms import EditRecipeForm from cookbook.models import Recipe, Category @@ -18,7 +18,7 @@ def recipe(request, recipe_id): recipe_obj.keywords.clear() recipe_obj.keywords.add(*list(form.cleaned_data['keywords'])) recipe_obj.save() - return redirect(reverse('edit_recipe', args=[recipe_id])) + return redirect(reverse_lazy('edit_recipe', args=[recipe_id])) else: form = EditRecipeForm(instance=recipe_obj)