Advanced Templating

For each project the django templating system is activated. PyBlue behaves as if the root directory were a Django project. Hence users may add their own templates and templatetags folders

Overriding templates

By default all templates will be loaded from the root directory of your application and if not found it will fall back to the PyBlue defaults.

Hence to override any template just add that file with the same name. To override the pyblue_assets.html that contains the custom css and js modules create your own templates/pyblue_assets.html file in your project.

Typically one would override the templates on a per project basis.

Custom template tags

PyBlue comes with a few simple template tags such as link and img but it also allows you to extend your templates with so called custom template tags.

The docs root folder has an example in the demotags.py custom template tag library that has the boom tag that be used as:

Site assets

Add {% assets %} to the head tag of the page to generate the CSS classes needed to syntax color embedded code.

Override the template called pyblue_assets.html to modify the assets.

Go back to: Home Page .