Skip to content

Commit

Permalink
bug #5431 Updated the code to display flash messages (aykin, javiereg…
Browse files Browse the repository at this point in the history
…uiluz)

This PR was submitted for the 2.6 branch but it was merged into the 2.3 branch instead (closes #5431).

Discussion
----------

Updated the code to display flash messages

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | all
| Fixed tickets | -

Commits
-------

c2676ae Improved the code used to display flash notices
176cdc6 Update the_controller.rst
  • Loading branch information
wouterj committed Jun 27, 2015
2 parents e15eb21 + c2676ae commit f905157
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions quick_tour/the_controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,11 @@ And you can display the flash message in the template like this:

.. code-block:: html+jinja

<div>
{{ app.session.flashbag.get('notice') }}
</div>
{% for flashMessage in app.session.flashbag.get('notice') %}
<div class="flash-notice">
{{ flashMessage }}
</div>
{% endfor %}

Final Thoughts
--------------
Expand Down

0 comments on commit f905157

Please sign in to comment.