diff gpp/bio/badges.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 b4305e18d3af
children 47f4259ce511
line wrap: on
line diff
--- a/gpp/bio/badges.py	Sat Jan 29 20:39:55 2011 +0000
+++ b/gpp/bio/badges.py	Sun Jan 30 20:02:32 2011 +0000
@@ -1,4 +1,5 @@
 """This module contains user profile badge-related functionality."""
+import logging
 
 from bio.models import Badge
 from bio.models import BadgeOwnership
@@ -14,11 +15,10 @@
     to the given user. If the user already has the badge,
     the badge count is incremented by one.
     """
-    import logging
     try:
         badge = Badge.objects.get(numeric_id=badge_id)
     except Badge.DoesNotExist:
-        logging.error("Can't award badge with numeric_id = %d" % badge_id)
+        logging.error("Can't award badge with numeric_id = %d", badge_id)
         return
 
     profile = user.get_profile()