sdi/views.py
author nishanth
Sat, 29 May 2010 10:24:18 +0530
changeset 14 ee492a4b9ebd
parent 9 47f72774489e
child 15 1c2d2e702aee
permissions -rw-r--r--
updated register view
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7
98f2b5c2abc9 added basic register view in views.py
nishanth
parents: 4
diff changeset
     1
from django.shortcuts import render_to_response
98f2b5c2abc9 added basic register view in views.py
nishanth
parents: 4
diff changeset
     2
98f2b5c2abc9 added basic register view in views.py
nishanth
parents: 4
diff changeset
     3
from sage_days.sdi.models import Registrant
9
47f72774489e added the return statement for register view
nishanth
parents: 7
diff changeset
     4
from sage_days.sdi.forms import RegisterForm
7
98f2b5c2abc9 added basic register view in views.py
nishanth
parents: 4
diff changeset
     5
98f2b5c2abc9 added basic register view in views.py
nishanth
parents: 4
diff changeset
     6
def register(request):
98f2b5c2abc9 added basic register view in views.py
nishanth
parents: 4
diff changeset
     7
    """ The user register page.
98f2b5c2abc9 added basic register view in views.py
nishanth
parents: 4
diff changeset
     8
    """
98f2b5c2abc9 added basic register view in views.py
nishanth
parents: 4
diff changeset
     9
9
47f72774489e added the return statement for register view
nishanth
parents: 7
diff changeset
    10
    if request.method == "POST":
14
ee492a4b9ebd updated register view
nishanth
parents: 9
diff changeset
    11
        form = RegisterForm(request.POST)
ee492a4b9ebd updated register view
nishanth
parents: 9
diff changeset
    12
        if form.is_valid():
ee492a4b9ebd updated register view
nishanth
parents: 9
diff changeset
    13
            pass
ee492a4b9ebd updated register view
nishanth
parents: 9
diff changeset
    14
        else:
ee492a4b9ebd updated register view
nishanth
parents: 9
diff changeset
    15
            return render_to_response("register.html", {"form":form})
9
47f72774489e added the return statement for register view
nishanth
parents: 7
diff changeset
    16
    else:
47f72774489e added the return statement for register view
nishanth
parents: 7
diff changeset
    17
        form = RegisterForm()
47f72774489e added the return statement for register view
nishanth
parents: 7
diff changeset
    18
        return render_to_response("register.html", {"form":form})