messages.add_message(request, messages.WARNING, 'You can post onlu one time in 24 hours!')
{% if messages %}
{% for message in messages %}
<div{% if message.tags %} class="alert alert-{{ message.tags }}"{% endif %}>
<a class="close" data-dismiss="alert" href="#">×</a>
{{ message }}
</div>
{% endfor %}
{% endif %}
def foo_view(request):
return render(request, 'foo_tpl.html', {'is_error': False})
{% if is_error %}
shit happens
{% endif%}