Doesn't do shit.
This commit is contained in:
parent
15a74f1f31
commit
fe97e02e41
@ -4,10 +4,9 @@
|
|||||||
''' Django views. '''
|
''' Django views. '''
|
||||||
from django.shortcuts import render, redirect, get_object_or_404
|
from django.shortcuts import render, redirect, get_object_or_404
|
||||||
from django.urls import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
from django.views.generic.edit import CreateView
|
from django.views.generic.edit import CreateView, UpdateView
|
||||||
from django.views import View
|
from django.views import View
|
||||||
from django.http import Http404
|
from django.http import Http404
|
||||||
from django.views.generic.edit import UpdateView
|
|
||||||
|
|
||||||
from .forms import (
|
from .forms import (
|
||||||
ExplorerCreationForm,
|
ExplorerCreationForm,
|
||||||
@ -97,12 +96,14 @@ class PlaceCreateView(View):
|
|||||||
place_image.save()
|
place_image.save()
|
||||||
|
|
||||||
class PlaceDeleteView(View):
|
class PlaceDeleteView(View):
|
||||||
template_name = 'delete_place.html'
|
#template_name = 'delete_place.html'
|
||||||
model = Place
|
#model = Place
|
||||||
form_class = PlaceDeleteForm
|
#form_class = PlaceDeleteForm
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, pk, *args, **kwargs):
|
||||||
|
place = Place(pk=pk)
|
||||||
|
print(pk, place.name)
|
||||||
place_delete_form = PlaceDeleteForm()
|
place_delete_form = PlaceDeleteForm()
|
||||||
|
|
||||||
context = {'place_form': place_delete_form}
|
context = {'place': place, 'form': place_delete_form}
|
||||||
return render(request, 'create_place.html', context)
|
return render(request, 'delete_place.html', context)
|
||||||
|
Loading…
Reference in New Issue
Block a user