request.
PYLUCID class is here: pylucid_project/apps/pylucid/system/pylucid_objects.py
The
PYLUCID object added by PyLucidMiddleware (pylucid_project/middlewares/pylucid_objects.py)
Note: Not all attributes exist in every case! e.g.
pagetree,
pagecontent,
pagemeta doesn't exist in pylucid_admin views...
- Model instances:
- request.PYLUCID.pagetree - Current
PageTree model instance
- request.PYLUCID.pagecontent - Current
PageContent model instance, but only if the current page is not a PagePlugin!
- language stuff:
- setup in pylucid_project/apps/pylucid/system/i18n.py
- request.PYLUCID.language_entry - client favored Language instance
- misc:
- request.PYLUCID.system_preferences - db
preferences as dict, from
pylucid.preference_forms.SystemPreferencesForm()
- request.PYLUCID.page_template - The globale page template as a string
- request.PYLUCID.context - Global template context
- request.PYLUCID.extrahead - Storage for plugin extra html head content
Note:
PYLUCID.default_language_entry and
PYLUCID.default_language_code are obsolete!
To get the system default language, use this:
(It used the language code defined with: settings.LANGUAGE_CODE)
pagetree, context, page_template,
pagecontent would be set in pylucid_project.apps.pylucid/views._render_page()
(New in 2548)
If you wand to see, witch attributes where attaches/changed, do this:
- turn settings.PYLUCID_OBJECTS_DEBUG and settings.DEBUG on
- Request any url
- click on the page_msg debug entries to see the trace steps.