{% extends "base.html" %} {% block title %}{% if post %}Edit{% else %}Add{% endif %} Post - {% firstof post.title "Untitled" %}{% endblock %} {% block header_content %}{% if post %}Edit{% else %}Add{% endif %} Post - {% firstof post.title "Untitled" %}{% endblock %} {% block main %}
{% include "_form_messages.html" with form=form %} {% csrf_token %}
{% if post %}

View this post

{% endif %} {% for field in form %}
{{ field }} {% if field.help_text %}
{{ field.help_text|safe }}
{% endif %}
{% endfor %}
{% if posts %} {% include "blog/_partial-list.html" with current_post=post %} {% endif %}
{% endblock %}