{% extends 'base.html' %} {% block content %}
<div class="post">
    {% if post.published_date %}
    <div class="date">
        {{ post.published_date }}
    </div>
    {% else %}
    <a class="btn btn-default" href="{% url 'post_publish' pk=post.pk %}">Publish</a>
    {% endif %}
    <a class="btn btn-default" href="{% url 'post_edit' pk=post.pk %}">
        <span class="glyphicon glyphicon-pencil"></span>
    </a>
    <a class="btn btn-default" href="{% url 'post_remove' pk=post.pk %}">
        <span class="glyphicon glyphicon-remove"></span>
    </a>
    <h1>{{ post.title }}</h1>
    <p>{{ post.text|linebreaksbr }}</p>
</div>
{% endblock %}