Formatting
This commit is contained in:
parent
c828d04f05
commit
1a8da002cf
@ -90,23 +90,19 @@ class PlaceCreateView(IsAuthenticatedMixin, View):
|
||||
submitter=submitter
|
||||
)
|
||||
|
||||
kwargs_to_pass = {
|
||||
'pk': place.pk
|
||||
}
|
||||
|
||||
messages.success(
|
||||
self.request, 'Successfully created place.')
|
||||
return redirect(reverse_lazy('place_detail', kwargs=kwargs_to_pass))
|
||||
self.request,
|
||||
'Successfully created place.'
|
||||
)
|
||||
return redirect(reverse_lazy('place_detail', kwargs={'pk': place.pk}))
|
||||
|
||||
else:
|
||||
context = {
|
||||
'form': form_place
|
||||
}
|
||||
|
||||
# Usually the browser should have checked the form before sending.
|
||||
messages.error(
|
||||
self.request, 'Please fill in all required fields.')
|
||||
return render(request, 'place/place_create.html', context)
|
||||
self.request,
|
||||
'Please fill in all required fields.'
|
||||
)
|
||||
return render(request, 'place/place_create.html', context={'form': form_place})
|
||||
|
||||
def _apply_multipart_image_upload(self, files, place, submitter):
|
||||
for image in files:
|
||||
|
Loading…
Reference in New Issue
Block a user