Mercurial > public > sg101
comparison gpp/accounts/views.py @ 259:75ea1a8be7f2
Fix some old import problems where I used 'from django.contrib import auth' instead of 'from django.contrib.auth.models import User'. Also some formatting changes while I was in there.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 21 Sep 2010 23:49:05 +0000 |
parents | df56795771a6 |
children | 767cedc7d12a |
comparison
equal
deleted
inserted
replaced
258:f9a9b4014d5b | 259:75ea1a8be7f2 |
---|---|
3 import datetime | 3 import datetime |
4 import logging | 4 import logging |
5 | 5 |
6 from django.shortcuts import render_to_response | 6 from django.shortcuts import render_to_response |
7 from django.template import RequestContext | 7 from django.template import RequestContext |
8 from django.contrib import auth | 8 from django.contrib.auth.models import User |
9 from django.http import HttpResponseRedirect | 9 from django.http import HttpResponseRedirect |
10 from django.core.urlresolvers import reverse | 10 from django.core.urlresolvers import reverse |
11 from django.conf import settings | 11 from django.conf import settings |
12 | 12 |
13 from accounts.models import PendingUser | 13 from accounts.models import PendingUser |
67 return render_to_response('accounts/register_failure.html', { | 67 return render_to_response('accounts/register_failure.html', { |
68 'username': username, | 68 'username': username, |
69 }, | 69 }, |
70 context_instance = RequestContext(request)) | 70 context_instance = RequestContext(request)) |
71 | 71 |
72 new_user = auth.models.User() | 72 new_user = User() |
73 | 73 |
74 new_user.username = pending_user.username | 74 new_user.username = pending_user.username |
75 new_user.first_name = '' | 75 new_user.first_name = '' |
76 new_user.last_name = '' | 76 new_user.last_name = '' |
77 new_user.email = pending_user.email | 77 new_user.email = pending_user.email |