Add a getSlotsRedirect to redirects.py
authorSverre Rabbelier <srabbelier@gmail.com>
Sun, 08 Mar 2009 14:37:28 +0000
changeset 1746 c99815c27c4d
parent 1745 d8a45f622241
child 1747 02f15a955c42
Add a getSlotsRedirect to redirects.py Patch by: Sverre Rabbelier
app/soc/views/helper/redirects.py
--- a/app/soc/views/helper/redirects.py	Sun Mar 08 14:36:55 2009 +0000
+++ b/app/soc/views/helper/redirects.py	Sun Mar 08 14:37:28 2009 +0000
@@ -269,6 +269,14 @@
   return result
 
 
+def getSlotsRedirect(entity, params):
+  """Returns the student proposal redirect for the given org and student.
+  """
+
+  return'/%s/slots/%s' % (
+      params['url_name'], entity.key().name())
+
+
 def getCreateDocumentRedirect(entity, prefix):
   """Returns the redirect for new documents.
   """