registration page

This commit is contained in:
Alicja Cięciwa
2020-11-11 18:43:45 +01:00
parent 37906ae85b
commit c26db18f86
17 changed files with 87 additions and 15 deletions

View File

@@ -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})