Changeset 1440 for trunk/pylucid/PyLucid/system/context_processors.py
- Timestamp:
- 02/22/08 15:02:26 (9 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/pylucid/PyLucid/system/context_processors.py
r1435 r1440 17 17 http://www.djangoproject.com/documentation/templates_python/#writing-your-own-context-processors 18 18 """ 19 context_extras = {} 20 21 #___________________________________________________________________________ 22 23 context_extras['powered_by'] = mark_safe( 24 '<a href="http://www.pylucid.org">PyLucid v%s</a>' \ 19 return { 20 "powered_by": mark_safe( 21 '<a href="http://www.pylucid.org">PyLucid v%s</a>' \ 25 22 % PYLUCID_VERSION_STRING 26 ) 27 28 #___________________________________________________________________________ 29 30 # The module_manager set "must_login": 31 if getattr(request, "must_login", False): 32 context_extras["robots"] = "NONE,NOARCHIVE" 33 else: 34 context_extras["robots"] = "index,follow" 35 36 #___________________________________________________________________________ 37 38 return context_extras 39 23 ), 24 # This value would be changed in index._render_cms_page(), if the 25 # plugin manager or any plugin set request.anonymous_view = False 26 "robots": "index,follow", 27 } 40 28 41 29 … … 53 41 txt = "%s [%s]" % (_("Log out"), request.user.username) 54 42 else: 55 url = URLs.commandLink("auth", "login/?next=%s" % request.path) 43 # url = URLs.commandLink("auth", "login/?next=%s" % request.path) 44 url = URLs.commandLink("auth", "login") 56 45 txt = _("Log in") 57 46 58 context["login_link"] = mark_safe( 59 '<a href="%s">%s</a>' % (url, txt) 60 ) 61 47 context["login_link"] = mark_safe('<a href="%s">%s</a>' % (url, txt)) 48 62 49 # Put the language information into the context, if it exists. 63 50 # see: http://www.djangoproject.com/documentation/i18n/ … … 66 53 else: 67 54 context['django_language']='' 68 69 55 70 56
