Renamed PlaceImageCreateForm to PlaceImageForm.
This commit is contained in:
@@ -11,7 +11,7 @@ from django.urls import reverse_lazy
|
||||
|
||||
from lostplaces.models import Place, PlaceImage
|
||||
from lostplaces.views import IsAuthenticatedMixin, IsPlaceSubmitterMixin
|
||||
from lostplaces.forms import PlaceForm, PlaceImageCreateForm, TagSubmitForm
|
||||
from lostplaces.forms import PlaceForm, PlaceImageForm, TagSubmitForm
|
||||
|
||||
from taggit.models import Tag
|
||||
|
||||
@@ -64,7 +64,7 @@ class PlaceUpdateView(IsAuthenticatedMixin, IsPlaceSubmitterMixin, SuccessMessag
|
||||
class PlaceCreateView(IsAuthenticatedMixin, View):
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
place_image_form = PlaceImageCreateForm()
|
||||
place_image_form = PlaceImageForm()
|
||||
place_form = PlaceForm()
|
||||
|
||||
context = {
|
||||
@@ -102,7 +102,7 @@ class PlaceCreateView(IsAuthenticatedMixin, View):
|
||||
self.request,
|
||||
'Please fill in all required fields.'
|
||||
)
|
||||
return render(request, 'place/place_create.html', context={'form': form_place})
|
||||
return render(request, 'place/place_create.html', context={'form': place_form})
|
||||
|
||||
def _apply_multipart_image_upload(self, files, place, submitter):
|
||||
for image in files:
|
||||
|
Reference in New Issue
Block a user