beautifed code and added descriptive comments

This commit is contained in:
Esther Kleinhenz
2018-12-09 19:22:30 +01:00
parent db60f32c07
commit faaa66aa8e
16 changed files with 112 additions and 74 deletions
+11
View File
@@ -1,6 +1,12 @@
<!--
marked parts of the template is external code
import from https://tutorial.djangogirls.org/en/template_extending/
-->
{% extends 'base.html' %}{% block content %}
{% load hitcount_tags %}
<div class="col-md-8">
<!-- imported start -->
<div class="post">
{% if post.published_date %}
<div class="date">
@@ -8,7 +14,11 @@
</div>
{% else %}
<a class="btn btn-outline-dark" href="{% url 'post_publish' pk=post.pk %}">Publish</a>
<!-- imported end -->
{% endif %} {% if user.is_staff and user == post.author %}
<!-- imported start -->
<a class="btn btn-outline-dark" href="{% url 'post_edit' pk=post.pk %}">
<span class="glyphicon glyphicon-pencil">Bearbeiten</span>
</a>
@@ -18,6 +28,7 @@
{% endif %}
<h1>{{ post.title }}</h1>
<p>{{ post.text|linebreaksbr }}</p>
<!-- imported end -->
<p>
Tags:
{% for tag in post.tags.all %}