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 940B

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