summaryrefslogtreecommitdiffstats
path: root/registration/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'registration/views.py')
-rw-r--r--registration/views.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/registration/views.py b/registration/views.py
index aac17c5..2d4373a 100644
--- a/registration/views.py
+++ b/registration/views.py
@@ -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()