Registration Page(Default )

Registration Route

urls.py

from django.urls import path
from core.views import SignUpView

urlpatterns = [
    path('signup/', SignUpView.as_view(), name='signup'),
]
<a href="{% url 'signup' %}">Register</a>

Views.py

from django.shortcuts import render
from django.urls import reverse_lazy
from django.views.generic import CreateView
from core.forms import SignUpForm

# Sign Up View
class SignUpView(CreateView):
    form_class = SignUpForm
    success_url = reverse_lazy('login')
    template_name = 'users/signup.html'

Forms.py

signup.html

It will look this

Last updated