Created
September 26, 2011 06:40
-
-
Save dmitric/1241726 to your computer and use it in GitHub Desktop.
Alerts in base.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="content"> | |
{% block alerts %} | |
{% try %} | |
{% if alerts is not None %} | |
{% for alert in alerts %} | |
<div class="{{alert.get('level', 'alert') }}"> | |
{{ alert.get('content') }} | |
</div> | |
{% end %} | |
{% end %} | |
{% except NameError %} | |
{% end %} | |
{% end %} | |
{% block page_content %}{% end %} | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment