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

1234567891011121314151617181920212223
  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 %}
  10. {% 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>{{ post.tag }}</p>
  21. </div>
  22. {% endblock %}