From 4bae11bb25a8e3c43118891d17fd8e981ecf8dc6 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Fri, 23 May 2014 10:48:20 -0400 Subject: Refactored code to use PEP8/Pyflake coding styles and cleaned up cruft a bit --- design/templates/comments/comment.html | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 design/templates/comments/comment.html (limited to 'design/templates/comments/comment.html') diff --git a/design/templates/comments/comment.html b/design/templates/comments/comment.html new file mode 100644 index 0000000..475775d --- /dev/null +++ b/design/templates/comments/comment.html @@ -0,0 +1,32 @@ +{% comment %} + Something that django.contrib.comments does not provide: + An individual template for a single comment, to easily be reused. + + This include is also used by the Ajax comments view. + The div id should be "c{id}", because the comment.get_absolute_url() points to it. + + NOTE: to override the displayed date format, don't replace this template. + Instead, define DATETIME_FORMAT in a locale file. Requires setting: + + FORMAT_MODULE_PATH = 'settings.locale' + + Then create 'settings/locale/XY/formats.py' with: + + DATETIME_FORMAT = '...' + + This should give you consistent dates across all views. +{% endcomment %} +{% load i18n %} +
+ {% if preview %}

{% trans "Preview of your comment" %}

{% endif %} +
+ {% if comment.url %}{%if comment.url == "http://lux.me/"%}{%else%}{% endif %}{% endif %} + {% if comment.name %}{{ comment.name }}{% else %}{% trans "Anonymous" %}{% endif %}{% comment %} + {% endcomment %}{% if comment.url %}{% endif %} + {% if not comment.is_public %}({% trans "moderated" %}){% endif %} + {% if USE_THREADEDCOMMENTS and not preview %}{% trans "reply" %}{% endif %} +
+ + +
{{ comment.comment|linebreaks }}
+
-- cgit v1.2.3-70-g09d2