Update signup view to use reverse_lazy for success URL
All checks were successful
Build and push Docker image / build (push) Successful in 2m19s
All checks were successful
Build and push Docker image / build (push) Successful in 2m19s
This commit is contained in:
parent
3069aab3f9
commit
fbe24915fe
1 changed files with 2 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
from django.contrib.auth.models import User
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.urls import reverse_lazy
|
||||
from django.views.generic.base import TemplateView
|
||||
from django.views.generic.edit import CreateView
|
||||
|
||||
|
@ -13,5 +14,5 @@ class HomePageView(TemplateView):
|
|||
class SignupView(SuccessMessageMixin, CreateView):
|
||||
model = User
|
||||
form_class = forms.UserSignupForm
|
||||
success_url = "/"
|
||||
success_url = reverse_lazy("login")
|
||||
success_message = "Le compte %(username)s a été créé avec succès."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue