Pages HTML
===========
Flask General principles
-------------------------
Flask templates
.................
Flask templates are based on Jinja.
They are often called at the end of a route
using the function :py:func:`flask.render_template`. Template variables are defined
in this function call. Its results are often the route return. EG:
::
@blueprint.route("/", methods=["GET", "POST"])
def administration():
var = 'Lorem Ipsum'
return render_template(
"administration.html", conf=current_app.config, var=var
)
Flask templating format can be found in Flask documentation `Templates `_
Static files
.............
Static files such as css and js files go into ``collectives/static`` folder.
.. warning::
Any CAF or FFCAM material (images, etc), must be placed into ``collectives/static/caf``
to clarify licensing.
To create a URL to a static files, please use :py:func:`url_for`. EG ``{{ url_for('static', filename='css/administration.css') }}``
Collectives use of templates
-----------------------------
Template standard usage
.........................
Most pages have an associated template file in ``collectives/templates/``. Usually,
all templates are embedded within ``collectives/templates/base.html`` which sets html architecture,
``