Renamed PlaceImageCreateForm to PlaceImageForm.

This commit is contained in:
2020-09-18 23:50:25 +02:00
parent 2a3ee3de8d
commit eb7fe88d59
3 changed files with 6 additions and 6 deletions

View File

@@ -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: