Add signup and login pages
This commit is contained in:
6
accounts/urls.py
Normal file
6
accounts/urls.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.urls import path
|
||||
from .views import SignUpView
|
||||
|
||||
urlpatterns = [
|
||||
path("signup/", SignUpView.as_view(), name="signup"),
|
||||
]
|
||||
@@ -1,3 +1,10 @@
|
||||
from django.shortcuts import render
|
||||
from django.urls import reverse_lazy
|
||||
from django.views.generic.edit import CreateView
|
||||
|
||||
# Create your views here.
|
||||
from .forms import CustomUserCreationForm
|
||||
|
||||
class SignUpView(CreateView):
|
||||
form_class = CustomUserCreationForm
|
||||
sucess_url = reverse_lazy("login")
|
||||
template_name = "registration/signup.html"
|
||||
|
||||
Reference in New Issue
Block a user