From 602a8bb1e68bd97379ee51911505cf32d3cf6324 Mon Sep 17 00:00:00 2001 From: Commander1024 Date: Fri, 7 Aug 2020 12:27:35 +0200 Subject: [PATCH] Got Place object in get request. --- lostplaces/lostplaces_app/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lostplaces/lostplaces_app/views.py b/lostplaces/lostplaces_app/views.py index 319c665..0228931 100644 --- a/lostplaces/lostplaces_app/views.py +++ b/lostplaces/lostplaces_app/views.py @@ -101,7 +101,7 @@ class PlaceDeleteView(View): #form_class = PlaceDeleteForm def get(self, request, pk, *args, **kwargs): - place = Place(pk=pk) + place = Place.objects.get(pk=pk) print(pk, place.name) place_delete_form = PlaceDeleteForm()