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.
 
 
 
pokercc/news/templates/news/post.html

52 lines
1.1 KiB

{% extends "base.html" %}
{% load static %}
{% block title %}My amazing blog{% endblock %}
{% block content %}
<img src="{% static 'media/' %}{{ post.image_url }}"/>
<h1><a href="{{ post.url }}">{{ post.title }}</a></h1>
<p class="contentbody">
{{ post.body }}
</p>
<div class="info">
{{ post.date }} - {{ post.author.username }}
</div>
<br/>
<form action="{% url 'news:comment' post.id %}" method="post">
{% csrf_token %}
<p>Add comment</p>
<p>
<textarea name="body" rows="8" cols="80"></textarea>
</p>
<input type="submit" value="Submit">
</form>
<br/>
<p>----Comments----</p>
{% for comment in comments %}
<p>
{% for n in comment.level %}<ul>{% endfor %}
{% if comment.upvoted == False %}
<form action="{% url 'news:upvote' comment.id %}" method="post">
{% csrf_token %}
<input type="submit" value="+1">
</form>
{% endif %}
<span class="info">{{ comment.author.username }} - {{ comment.date }} - score = {{ comment.score }}</span>
<br/>
{{ comment.body }}
{% for n in comment.level %}</ul>{% endfor %}
</p>
{% endfor %}
{% endblock content %}