forked from expo/troggle
[svn] Improve registration system.
Add jquery fade effects and quick search. Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8334 by cucc @ 5/10/2009 5:23 AM
This commit is contained in:
@@ -2,13 +2,16 @@
|
||||
Views which allow users to create and activate accounts.
|
||||
|
||||
"""
|
||||
|
||||
from django.contrib.auth import login
|
||||
from django.contrib.auth import authenticate
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.http import HttpResponseRedirect
|
||||
from django.shortcuts import render_to_response
|
||||
from django.template import RequestContext
|
||||
from django.contrib.auth import login
|
||||
|
||||
|
||||
from registration.forms import RegistrationForm
|
||||
from registration.models import RegistrationProfile
|
||||
@@ -60,8 +63,14 @@ def activate(request, activation_key,
|
||||
registration/activate.html or ``template_name`` keyword argument.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
activation_key = activation_key.lower() # Normalize before trying anything with it.
|
||||
account = RegistrationProfile.objects.activate_user(activation_key)
|
||||
try:
|
||||
print account
|
||||
except:
|
||||
pass
|
||||
if extra_context is None:
|
||||
extra_context = {}
|
||||
context = RequestContext(request)
|
||||
@@ -139,6 +148,7 @@ def register(request, success_url=None,
|
||||
# a default value using reverse() will cause circular-import
|
||||
# problems with the default URLConf for this application, which
|
||||
# imports this file.
|
||||
|
||||
return HttpResponseRedirect(success_url or reverse('registration_complete'))
|
||||
else:
|
||||
form = form_class()
|
||||
|
||||
Reference in New Issue
Block a user