Added redirect for use to manage statistics.
Also some minor stylish issues fixed.
--- a/app/soc/views/helper/redirects.py Fri Aug 14 10:28:27 2009 -0700
+++ b/app/soc/views/helper/redirects.py Mon Aug 17 13:52:50 2009 +0200
@@ -18,6 +18,7 @@
"""
__authors__ = [
+ '"Daniel Hans" <daniel.m.hans@gmail.com>',
'"Sverre Rabbelier" <sverre@rabbelier.nl>',
'"Lennard de Rijk" <ljvderijk@gmail.com>',
]
@@ -35,6 +36,7 @@
return result
+
def getInviteRedirect(entity, params):
"""Returns the invitation redirect for the specified entity.
"""
@@ -127,6 +129,7 @@
return '/%s/review_overview/%s' % (
params['url_name'], entity.key().id_or_name())
+
def getCreateRequestRedirect(entity, params):
"""Returns the create request redirect for the specified entity.
"""
@@ -219,6 +222,7 @@
return result
+
def getAcceptProjectRedirect(entity, params):
"""Returns the redirect for accept_project access type.
"""
@@ -428,7 +432,7 @@
Args:
entity: a Survey Record entity
params: params for a Survey view
-
+
"""
return '/%s/record/%s?id=%s' % (
@@ -468,7 +472,17 @@
def getSubscribeRedirect(entity, params):
- """Redirects to subscription XML doc for an entity
+ """Redirects to subscription XML doc for an entity.
"""
return'/%s/subscribe/%s' % (
params['url_name'], entity.key().name())
+
+
+def getManageStatisticsRedirect(entity, params):
+ """Returns redirect for managing statistic view.
+ """
+
+ result = '/%s/manage_stats/%s' % (
+ params['url_name'], entity.key().id_or_name())
+
+ return result