Post adding and editing forms
[django-girls.git] / blog / templates / blog / post_detail.html
index 18073a993fd672889e0803c0ac856aacdbf3d2c1..3cdd85041bc526d865b630f3e85a05e507d45766 100644 (file)
@@ -7,6 +7,9 @@
                        {{ post.published_date }}
                </div>
        {% endif %}
+       {% if user.is_authenticated %}
+               <a class="btn btn-default" href="{% url 'post_edit' pk=post.pk %}"><span class="glyphicon glyphicon-pencil"></span></a>
+       {% endif %}
        <h1>{{ post.title }}</h1>
        <p>{{ post.text|linebreaksbr }}</p>
 </div>