diff gpp/accounts/views.py @ 316:767cedc7d12a

Fixing #144; integrate with new Django logging support. Also added unit tests for Donations app.
author Brian Neal <bgneal@gmail.com>
date Sun, 30 Jan 2011 20:02:32 +0000
parents 75ea1a8be7f2
children 69d0306a6fe7
line wrap: on
line diff
--- a/gpp/accounts/views.py	Sat Jan 29 20:39:55 2011 +0000
+++ b/gpp/accounts/views.py	Sun Jan 30 20:02:32 2011 +0000
@@ -47,7 +47,7 @@
 def register_confirm(request, username, key):
     if request.user.is_authenticated():
         return HttpResponseRedirect(settings.LOGIN_REDIRECT_URL)
-    
+
     # purge expired users
 
     PendingUser.objects.purge_expired()
@@ -56,14 +56,14 @@
     try:
         pending_user = PendingUser.objects.get(username = username)
     except PendingUser.DoesNotExist:
-        logging.error('Accounts register_confirm [%s]: user does not exist: %s' % (ip, username))
+        logging.error('Accounts register_confirm [%s]: user does not exist: %s', ip, username)
         return render_to_response('accounts/register_failure.html', {
             'username': username,
             },
             context_instance = RequestContext(request))
 
     if pending_user.key != key:
-        logging.error('Accounts register_confirm [%s]: key error: %s' % (ip, username))
+        logging.error('Accounts register_confirm [%s]: key error: %s', ip, username)
         return render_to_response('accounts/register_failure.html', {
             'username': username,
             },
@@ -85,7 +85,7 @@
     new_user.save()
     pending_user.delete()
 
-    logging.info('Accounts register_confirm [%s]: success: %s' % (ip, username))
+    logging.info('Accounts register_confirm [%s]: success: %s', ip, username)
     return render_to_response('accounts/register_success.html', {
         'username': username,
         },