What do you think about expanding the template and setting the "flash" parameter to the template?
for example, a basic template:
<html... bla blah ... <body ... bla blah {% if flash %} {{flash}} {% endif %} <!-- more html here --> {% block content %} your dynamic block here... {% endblock %}
now in every template
{% extends "base_template.html" %} {% block content %} {% if object %} success to edit : {{object.title }} {% endif %} {% endblock %}
your handler should pass the flash-template to the template, it will be used in the base template.
llazzaro Feb 09 2018-11-11T00: 00Z
source share