Added success message to deleteview.

This commit is contained in:
Marcus Scholz 2020-08-12 20:56:37 +02:00
parent 0b3aff1d1d
commit 564d20c73e

View File

@ -46,7 +46,7 @@ class SignUpView(SuccessMessageMixin, CreateView):
form_class = ExplorerCreationForm form_class = ExplorerCreationForm
success_url = reverse_lazy('login') success_url = reverse_lazy('login')
template_name = 'signup.html' template_name = 'signup.html'
success_message = 'User created' success_message = 'User created.'
class PlaceListView(IsAuthenticated, View): class PlaceListView(IsAuthenticated, View):
def get(self, request): def get(self, request):
@ -138,6 +138,5 @@ class PlaceCreateView(IsAuthenticated, View):
class PlaceDeleteView(IsAuthenticated, IsSubmitter, SuccessMessageMixin, DeleteView): class PlaceDeleteView(IsAuthenticated, IsSubmitter, SuccessMessageMixin, DeleteView):
template_name = 'place/place_delete.html' template_name = 'place/place_delete.html'
model = Place model = Place
success_url = reverse_lazy('place_list')
success_message = 'Successfully deleted place.' success_message = 'Successfully deleted place.'
success_url = reverse_lazy('place_list')