Merge branch 'master' of mowoe.com:reverend/lostplaces-backend

This commit is contained in:
Marcus Scholz 2020-08-12 20:44:13 +02:00
commit 0cf482dc5c

View File

@ -10,6 +10,8 @@ from django.http import Http404
from django.contrib import messages
from django.contrib.auth.mixins import UserPassesTestMixin, LoginRequiredMixin
from django.contrib.messages.views import SuccessMessageMixin
from .forms import (
ExplorerCreationForm,
PlaceForm,
@ -40,10 +42,11 @@ class IsSubmitter(UserPassesTestMixin, View):
self.request, 'You do not have permission to do this.')
return False
class SignUpView(CreateView):
class SignUpView(SuccessMessageMixin, CreateView):
form_class = ExplorerCreationForm
success_url = reverse_lazy('login')
template_name = 'signup.html'
success_message = 'User created'
class PlaceListView(IsAuthenticated, View):
def get(self, request):