Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions recipes/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
recipe_update_view,
recipe_detail_hx_view,
recipe_ingredient_update_hx_view,
recipe_incredient_delete_view,
recipe_ingredient_delete_view,
recipe_ingredient_image_upload_view


Expand All @@ -25,7 +25,7 @@
path("hx/<int:id>/", recipe_detail_hx_view, name='hx-detail'),

path("<int:parent_id>/image-upload/", recipe_ingredient_image_upload_view, name='recipe-ingredient-image-upload'),
path("<int:parent_id>/ingredient/<int:id>/delete/", recipe_incredient_delete_view, name='ingredient-delete'),
path("<int:parent_id>/ingredient/<int:id>/delete/", recipe_ingredient_delete_view, name='ingredient-delete'),
path("<int:id>/delete/", recipe_delete_view, name='delete'),
path("<int:id>/edit/", recipe_update_view, name='update'),
path("<int:id>/", recipe_detail_view, name='detail'),
Expand Down
2 changes: 1 addition & 1 deletion recipes/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def recipe_delete_view(request, id=None):


@login_required
def recipe_incredient_delete_view(request, parent_id=None, id=None):
def recipe_ingredient_delete_view(request, parent_id=None, id=None):
try:
obj = RecipeIngredient.objects.get(recipe__id=parent_id, id=id, recipe__user=request.user)
except:
Expand Down