Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

post_detail.html 1.1KB

123456789101112131415161718192021222324252627282930313233343536
  1. {% extends 'base.html' %}{% block content %}
  2. {% load hitcount_tags %}
  3. <div class="post">
  4. {% if post.published_date %}
  5. <div class="date">
  6. {{ post.published_date }}
  7. </div>
  8. {% else %}
  9. <a class="btn btn-outline-dark" href="{% url 'post_publish' pk=post.pk %}">Publish</a>
  10. {% endif %} {% if user.is_staff and user == post.author %}
  11. <a class="btn btn-outline-dark" href="{% url 'post_edit' pk=post.pk %}">
  12. <span class="glyphicon glyphicon-pencil">Edit</span>
  13. </a>
  14. <a class="btn btn-outline-dark" href="{% url 'post_remove' pk=post.pk %}">
  15. <span class="glyphicon glyphicon-remove">Remove</span>
  16. </a>
  17. {% endif %}
  18. <h1>{{ post.title }}</h1>
  19. <p>{{ post.text|linebreaksbr }}</p>
  20. <p>
  21. Tags:
  22. {% for tag in post.tags.all %}
  23. <a href="{% url 'blog_search_list_view' %}">{{ tag.name }}, </a>
  24. {% endfor %}
  25. </p>
  26. <p>
  27. Autor: {{ post.author }}
  28. </p>
  29. {% if user.is_staff %}
  30. <p>
  31. {% get_hit_count for post %} Benutzer haben diesen Post bereits gelesen!
  32. </p>
  33. {% endif %}
  34. </div>
  35. {% endblock %}