Add a getListRedirect and getListPublicRedirect function
authorSverre Rabbelier <srabbelier@gmail.com>
Sat, 14 Feb 2009 20:22:17 +0000
changeset 1323 a666374587df
parent 1322 5153bd89147f
child 1324 8cf30dee8048
Add a getListRedirect and getListPublicRedirect function Patch by: Sverre Rabbelier
app/soc/views/helper/redirects.py
--- a/app/soc/views/helper/redirects.py	Sat Feb 14 20:21:51 2009 +0000
+++ b/app/soc/views/helper/redirects.py	Sat Feb 14 20:22:17 2009 +0000
@@ -71,6 +71,22 @@
       params['url_name'], entity.key().name())
 
 
+def getListRedirect(entity, params):
+  """Returns the public redirect for the specified entity.
+  """
+
+  return '/%s/list/%s' % (
+      params['url_name'], entity.key().name())
+
+
+def getPublicListRedirect(entity, params):
+  """Returns the public redirect for the specified entity.
+  """
+
+  return '/%s/list_public/%s' % (
+      params['url_name'], entity.key().name())
+
+
 def getExportRedirect(entity, params):
   """Returns the export redirect for the specified entity.
   """