registration page
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
from django.shortcuts import render
|
||||
from django.shortcuts import render, redirect
|
||||
from .forms import RegisterForm
|
||||
|
||||
# Create your views here.
|
||||
|
||||
def register(response):
|
||||
if response.method == "POST":
|
||||
form = RegisterForm(response.POST)
|
||||
if form.is_valid():
|
||||
form.save()
|
||||
return redirect("/")
|
||||
else:
|
||||
form = RegisterForm()
|
||||
return render(response, "registration/signup.html", {"form":form})
|
||||
|
||||
Reference in New Issue
Block a user