Create and display comments
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% block title %}
|
||||
Comment "{{ post.title }}"
|
||||
{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Comment "{{ post.title }}"</h1>
|
||||
<form method="post">
|
||||
<label for="content">Content</label>
|
||||
<textarea name="content"></textarea>
|
||||
|
||||
{% if responding_to %}
|
||||
<input name="respond_to" value="{{ responding_to }}">
|
||||
{% endif %}
|
||||
|
||||
<input type="submit" value="Submit comment"/>
|
||||
</form>
|
||||
{% endblock content %}
|
||||
|
||||
@@ -5,11 +5,20 @@
|
||||
{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ post.title }}</h1>
|
||||
<p>Published in {{ blog.title }}</p>
|
||||
<hr>
|
||||
<p>
|
||||
{{ post.content | safe }}
|
||||
</p>
|
||||
<p>License: {{ post.license }}</p>
|
||||
<h1>{{ post.title }}</h1>
|
||||
<p>Published in {{ blog.title }}</p>
|
||||
<hr>
|
||||
<p>
|
||||
{{ post.content | safe }}
|
||||
</p>
|
||||
<p>License: {{ post.license }}</p>
|
||||
<hr>
|
||||
<h2>Comments</h2>
|
||||
{% for comment in comments %}
|
||||
<div>
|
||||
<b>{{ comment.author.display_name }}</b>
|
||||
<div>{{ comment.content | safe }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<a href="comment">Comment</a>
|
||||
{% endblock content %}
|
||||
|
||||
Reference in New Issue
Block a user