|
12345678910111213141516171819202122232425262728293031323334353637 |
- {% extends 'base.html' %}{% block content %}
- {% load hitcount_tags %}
- <div class="post">
-
- {% if post.published_date %}
- <div class="date">
- {{ post.published_date }}
- </div>
- {% else %}
- <a class="btn btn-outline-dark" href="{% url 'post_publish' pk=post.pk %}">Publish</a>
- {% endif %} {% if user.is_staff and user == post.author %}
- <a class="btn btn-outline-dark" href="{% url 'post_edit' pk=post.pk %}">
- <span class="glyphicon glyphicon-pencil">Bearbeiten</span>
- </a>
- <a class="btn btn-outline-dark" href="{% url 'post_remove' pk=post.pk %}">
- <span class="glyphicon glyphicon-remove">Löschen</span>
- </a>
- {% endif %}
- <h1>{{ post.title }}</h1>
- <p>{{ post.text|linebreaksbr }}</p>
- <p>
- Tags:
- {% for tag in post.tags.all %}
- <a href="{% url 'blog_search_list_view' %}">{{ tag.name }} </a>
- {% if not forloop.last %}, {% endif %}
- {% endfor %}
- </p>
- <p>
- Autor: {{ post.author }}
- </p>
- {% if user.is_staff %}
- <p>
- {% get_hit_count for post %} Benutzer haben diesen Post bereits gelesen!
- </p>
- {% endif %}
- </div>
- {% endblock %}
|