From 5160e53a933465999c094b6d0decf901f8cc8594 Mon Sep 17 00:00:00 2001 From: hernani Date: Thu, 15 Apr 2010 23:26:27 +0000 Subject: [PATCH] removed some debugging statements git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@35 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum/templatetags/user_tags.py | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/forum/templatetags/user_tags.py b/forum/templatetags/user_tags.py index f50917a..0e9ae27 100644 --- a/forum/templatetags/user_tags.py +++ b/forum/templatetags/user_tags.py @@ -42,25 +42,19 @@ class ActivityNode(template.Node): 'type': activity.activity_type, } - try: - if activity.activity_type == const.TYPE_ACTIVITY_PRIZE: - context['badge'] = True - context['title'] = activity.content_object.badge.name - context['url'] = activity.content_object.badge.get_absolute_url() - context['badge_type'] = activity.content_object.badge.type - else: - context['title'] = activity.node.headline - context['url'] = activity.node.get_absolute_url() - - if activity.activity_type in (const.TYPE_ACTIVITY_UPDATE_ANSWER, const.TYPE_ACTIVITY_UPDATE_QUESTION): - context['revision'] = True - context['summary'] = activity.content_object.summary or \ - _('Revision n. %(rev_number)d') % {'rev_number': activity.content_object.revision} - except Exception, e: - import sys, traceback - traceback.print_exc(file=sys.stdout) - pass - + if activity.activity_type == const.TYPE_ACTIVITY_PRIZE: + context['badge'] = True + context['title'] = activity.content_object.badge.name + context['url'] = activity.content_object.badge.get_absolute_url() + context['badge_type'] = activity.content_object.badge.type + else: + context['title'] = activity.node.headline + context['url'] = activity.node.get_absolute_url() + + if activity.activity_type in (const.TYPE_ACTIVITY_UPDATE_ANSWER, const.TYPE_ACTIVITY_UPDATE_QUESTION): + context['revision'] = True + context['summary'] = activity.content_object.summary or \ + _('Revision n. %(rev_number)d') % {'rev_number': activity.content_object.revision} return self.template.render(template.Context(context)) -- 2.39.5