Added a getCreateDocumentRedirect
authorSverre Rabbelier <srabbelier@gmail.com>
Fri, 30 Jan 2009 22:01:52 +0000
changeset 1096 258af84e2e56
parent 1095 0122dc66e5d2
child 1097 1f7015b33a0c
Added a getCreateDocumentRedirect Patch by: Sverre Rabbelier
app/soc/views/helper/redirects.py
--- a/app/soc/views/helper/redirects.py	Fri Jan 30 22:01:27 2009 +0000
+++ b/app/soc/views/helper/redirects.py	Fri Jan 30 22:01:52 2009 +0000
@@ -211,6 +211,13 @@
       params['url_name'], entity.link_id)
 
 
+def getCreateDocumentRedirect(entity, prefix):
+  """Returns the redirect for new documents.
+  """
+
+  return '/document/create/%s/%s' % (prefix, entity.key().name())
+
+
 def getToSRedirect(presence):
   """Returns link to 'show' the ToS Document if it exists, None otherwise.