Add Accounts App
This commit is contained in:
parent
24cdebe960
commit
5eb1972c41
9
api/accounts/urls.py
Normal file
9
api/accounts/urls.py
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# accounts/urls.py
|
||||||
|
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
|
# accounts/views.py
|
||||||
|
from django.contrib.auth.forms import UserCreationForm
|
||||||
|
from django.urls import reverse_lazy
|
||||||
|
from django.views import generic
|
||||||
|
|
||||||
# Create your views here.
|
|
||||||
|
class SignUpView(generic.CreateView):
|
||||||
|
form_class = UserCreationForm
|
||||||
|
success_url = reverse_lazy("login")
|
||||||
|
template_name = "registration/signup.html"
|
||||||
|
Loading…
Reference in New Issue
Block a user