Add Accounts App

This commit is contained in:
ahosking 2023-06-01 18:45:24 -04:00
parent 24cdebe960
commit 5eb1972c41
2 changed files with 18 additions and 2 deletions

9
api/accounts/urls.py Normal file
View 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"),
]

View File

@ -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"