(TODO: Update changes in command and installation workflow!)
Page retrival and rendering is controlled by index.py. For normal CMS page the process is as follows:
1. Call system.detect_page.get_current_page_obj(request, url_info). This will check existence of requested page and access permission of current user. Page search is based on
Page shortcut and thus page url has very loose syntax, so
that for a page (complete link):
http://www.pylucid.org/about/features/unicode-test/DecodeUnicode
These "wrong" links will work too:
http://www.pylucid.org/about/features/DecodeUnicode
http://www.pylucid.org/about/DecodeUnicode
http://www.pylucid.org/DecodeUnicode
and also this:
http://www.pylucid.org/some/not/existing/stuff/DecodeUnicode
Here we get a Redirect to the right page:
http://www.pylucid.org/DecodeUnicode/some/other/stuff/
2. Call _get_context(request, current_page_obj), which will initialize context dict with help of django.template.RequestContext(request). Page messages are initialized with system.page_msg.PageMessages(context). Context related URLs are build with system.URLs(context) and system.context_processors.add_dynamic_context(request, context). The function will also set up redirection of warnings to page messages with tools.content_processors.redirect_warnings()
3. Render requested cms page with _render_cms_page(request, context) function. This function takes following steps during context rendering: It applies page markup with tools.content_processors.apply_markup(page_content, context, current_page.markup), renders page from page template with tools.content_processors.render_string_template() and inserts JS/CSS data from any Plugin after the page is rendered with the django template engine.
4. Return HttpResponse.
django-processinfo: 5.6 ms of 264.7 ms (2.1%)