34 lines
1.2 KiB
HTML
34 lines
1.2 KiB
HTML
{% extends 'blog/base.html' %}
|
|
|
|
{% block content %}
|
|
<div class="block" style="position: relative; ">
|
|
<h1>{{ post.title }}</h1>
|
|
<h3> Теги:
|
|
{% if tags %}
|
|
{% for tag in tags %}
|
|
<a href="{% url 'search_by_tag' tag=tag%}">{{ tag }}</a>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</h3>
|
|
|
|
<p>{{ post.text|safe|linebreaksbr }}</p>
|
|
<span>
|
|
{% if post.published_date %}
|
|
{{ post.published_date }}
|
|
{% endif %}
|
|
</span>
|
|
|
|
<span class="edit" style="position: absolute; right: 10px; bottom: 10px;"><a href="{% url 'post_edit' pk=post.pk %}">edit post</a></span>
|
|
<span class="edit" style="position: absolute; right: 80px; bottom: 10px;"><a href='#deletionDialog';">delete</a></span>
|
|
<div id="deletionDialog" class="dialog">
|
|
<div>
|
|
<p align="right"><a href=""><img src="http://py.difrex.ru/media/images/x.PNG"></a></p>
|
|
<form method="POST">{% csrf_token %}
|
|
<input type=hidden name="id" value="{{ post.pk }}"> confirm deletion of {{ post.pk }} {{ post.title }}
|
|
<input type="submit" name="action" value="delete">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|