work on comments, clean up a bit

This commit is contained in:
bkfox
2016-05-26 00:51:23 +02:00
parent f8f3beb124
commit a989e53da4
9 changed files with 249 additions and 86 deletions

View File

@ -29,6 +29,6 @@
{% endblock %}
{% block content %}
{{ content }}
{{ content|safe }}
{% endblock %}

View File

@ -10,21 +10,21 @@
{% endif %}
{% if header %}
<header class="section_header">
<header>
{% block section_header %}
{{ header }}
{% endblock %}
</header>
{% endif %}
<div class="section_content">
<div class="content">
{% block section_content %}
{{ content|safe }}
{% endblock %}
</div>
{% if footer %}
<footer class="section_footer">
<footer>
{% block section_footer %}
{{ footer }}
{% endblock %}

View File

@ -0,0 +1,49 @@
{% extends "aircox/cms/section.html" %}
{% load i18n %}
{% load honeypot %}
{% block section_content %}
{{ form.non_field_errors }}
<form action="" method="POST" class="comment-form">
{% csrf_token %}
{% render_honeypot_field "hp_website" %}
<div>
{{ form.author.errors }}
{{ form.author }}
<input type="checkbox" value="1">
<div class="extra">
{{ form.email.errors }}
{{ form.email }}
{{ form.url.errors }}
{{ form.url }}
</div>
</div>
<div>
{{ form.content.errors }}
{{ form.content }}
<button type="submit">{% trans "Post!" %}</button>
</div>
</form>
<ul style="padding:0; margin:0">
{% for item in object_list %}
<li id="comment-{{ item.id }}" class="{{item.css}}">
{{ item.content }}
<div class="info">
<a href="{% if item.url %}{{ item.url }}{% else %}#{% endif %}">{{ item.author }}</a>
<time datetime="{{ item.date }}">
{{ item.date|date:'l d F Y' }},
{{ item.date|time:'H\hi' }}
</time>
<a href="#comment-{{ item.id }}">#{{ item.id }}</a>
</div>
</li>
{% endfor %}
</ul>
{% endblock %}

View File

@ -2,7 +2,7 @@
{% load thumbnail %}
% block section_content %}
{% block section_content %}
<ul style="padding:0; margin:0">
{% for item in object_list %}
<li class="{{item.css}}">