(TODO: Update changes in command and installation workflow!)

Normal page

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):
These "wrong" links will work too:
and also this:
Here we get a Redirect to the right page:

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.

execute a command

  • main (PyLucid_app.py)
    • init
    • init2
    • setup_staticTagTags
  • template
    • get internal page template from db
    • write template to response object
  • replacer middleware
    • replace all tags with the module manager

install section

  • main (PyLucid_app.py)
    • init
  • installPyLucid (PyLucid/install/install.py)
    • write all output to response object
  • replacer middleware
    • replace only page_msg and script_duration