Merge branch 'master' of mowoe.com:reverend/lostplaces-backend
This commit is contained in:
commit
0cf482dc5c
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user