app/soc/views/user/profile.py
changeset 384 45d6a1b492d6
parent 383 8a8820544caa
child 389 9b873166d7d5
equal deleted inserted replaced
383:8a8820544caa 384:45d6a1b492d6
   105 
   105 
   106   if (not id) and (not link_name):
   106   if (not id) and (not link_name):
   107     # not logged in, and no link name, so request that the user sign in 
   107     # not logged in, and no link name, so request that the user sign in 
   108     return simple.requestLogin(request, page, template, context,
   108     return simple.requestLogin(request, page, template, context,
   109         # TODO(tlarsen): /user/profile could be a link to a help page instead
   109         # TODO(tlarsen): /user/profile could be a link to a help page instead
   110         login_message_fmt='To create a new'
   110         login_message_fmt=ugettext_lazy('To create a new'
   111                           ' <a href="/user/profile">User Profile</a>'
   111                           ' <a href="/user/profile">User Profile</a>'
   112                           ' or modify an existing one, you must first'
   112                           ' or modify an existing one, you must first'
   113                           ' <a href="%(sign_in)s">sign in</a>.')
   113                           ' <a href="%(sign_in)s">sign in</a>.'))
   114 
   114 
   115   if (not id) and link_name:
   115   if (not id) and link_name:
   116     # not logged in, so show read-only public profile for link_name user
   116     # not logged in, so show read-only public profile for link_name user
   117     return simple.public(request, page=page, template=template, 
   117     return simple.public(request, page=page, template=template, 
   118                          link_name=link_name, context=context)
   118                          link_name=link_name, context=context)