app/soc/views/helper/redirects.py
changeset 1096 258af84e2e56
parent 1065 b661dc8ffd5f
child 1138 18ef39338211
equal deleted inserted replaced
1095:0122dc66e5d2 1096:258af84e2e56
   209 
   209 
   210   return '/%s/applicant/%s' % (
   210   return '/%s/applicant/%s' % (
   211       params['url_name'], entity.link_id)
   211       params['url_name'], entity.link_id)
   212 
   212 
   213 
   213 
       
   214 def getCreateDocumentRedirect(entity, prefix):
       
   215   """Returns the redirect for new documents.
       
   216   """
       
   217 
       
   218   return '/document/create/%s/%s' % (prefix, entity.key().name())
       
   219 
       
   220 
   214 def getToSRedirect(presence):
   221 def getToSRedirect(presence):
   215   """Returns link to 'show' the ToS Document if it exists, None otherwise.
   222   """Returns link to 'show' the ToS Document if it exists, None otherwise.
   216 
   223 
   217   Args:
   224   Args:
   218     presence: Presence entity that may or may not have a tos property
   225     presence: Presence entity that may or may not have a tos property