Added missing self to get method.

This commit is contained in:
Marcus Scholz 2020-08-12 20:11:25 +02:00
parent 759c42279d
commit 1130ee70d9

View File

@ -46,14 +46,14 @@ class SignUpView(CreateView):
template_name = 'signup.html' template_name = 'signup.html'
class PlaceListView(IsAuthenticated, View): class PlaceListView(IsAuthenticated, View):
def get(request): def get(self, request):
context = { context = {
'place_list': Place.objects.all() 'place_list': Place.objects.all()
} }
return render(request, 'place/place_list.html', context) return render(request, 'place/place_list.html', context)
class PlaceDetailView(IsAuthenticated, View): class PlaceDetailView(IsAuthenticated, View):
def get(request, pk): def get(self, request, pk):
context = { context = {
'place': Place.objects.get(pk=pk) 'place': Place.objects.get(pk=pk)
} }