app/soc/views/user/profile.py
changeset 391 849aa913e9c8
parent 389 9b873166d7d5
child 408 7cd6bdfbf95c
equal deleted inserted replaced
390:d12c95ade374 391:849aa913e9c8
   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=ugettext_lazy('To create a new'
   110         login_message_fmt=ugettext_lazy(
   111                           ' <a href="/user/profile">User Profile</a>'
   111             'To create a new <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)