15
|
1 |
from django.shortcuts import render_to_response, redirect
|
7
|
2 |
|
|
3 |
from sage_days.sdi.models import Registrant
|
9
|
4 |
from sage_days.sdi.forms import RegisterForm
|
7
|
5 |
|
|
6 |
def register(request):
|
|
7 |
""" The user register page.
|
|
8 |
"""
|
|
9 |
|
9
|
10 |
if request.method == "POST":
|
14
|
11 |
form = RegisterForm(request.POST)
|
|
12 |
if form.is_valid():
|
15
|
13 |
form.save()
|
|
14 |
return redirect("/registration/complete")
|
14
|
15 |
else:
|
|
16 |
return render_to_response("register.html", {"form":form})
|
9
|
17 |
else:
|
|
18 |
form = RegisterForm()
|
|
19 |
return render_to_response("register.html", {"form":form})
|