Success message for place update.

This commit is contained in:
Marcus Scholz 2020-08-12 20:44:08 +02:00
parent 852def01d2
commit 275bec6560

View File

@ -73,6 +73,8 @@ class PlaceUpdateView(IsAuthenticated, IsSubmitter, UpdateView):
form_class = PlaceForm form_class = PlaceForm
def get_success_url(self): def get_success_url(self):
messages.success(
self.request, 'Successfully updated place.')
return reverse_lazy('place_detail', kwargs={'pk':self.get_object().pk}) return reverse_lazy('place_detail', kwargs={'pk':self.get_object().pk})
class PlaceCreateView(IsAuthenticated, View): class PlaceCreateView(IsAuthenticated, View):