Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[UI] Flash Message keys #10985

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat(ui): flash message keys added
As the FlashBah can store multiples message keys, it could be a good idea to indicate that we can use the different keys.
  • Loading branch information
Guikingone authored Feb 11, 2019
commit 9516b1558dda3450d3e33de94e1c486b48f368ed
11 changes: 10 additions & 1 deletion 11 controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,16 @@ read any flash messages from the session using ``app.flashes()``:
</div>
{% endfor %}

{# ...or you can read and display every flash message available #}
{# ...or you can read and display every flash message available for given labels #}
{% for label, messages in app.flashes(['success', 'warning']) %}
{% for message in messages %}
<div class="flash-{{ label }}">
{{ message }}
</div>
{% endfor %}
{% endfor %}

{# ...finally you can read and display every flash message available #}
{% for label, messages in app.flashes %}
{% for message in messages %}
<div class="flash-{{ label }}">
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.