From a2891841fbf1e5660693a1f9109f2e6810224a3b Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sun, 5 May 2019 11:40:42 -0500 Subject: added tutorials with comments --- .../templates/comments/400-debug.html | 116 +++++++++++++++++++++ .../templates/comments/approve.html | 16 +++ .../templates/comments/approved.html | 8 ++ app/django_comments/templates/comments/base.html | 10 ++ app/django_comments/templates/comments/delete.html | 16 +++ .../templates/comments/deleted.html | 8 ++ app/django_comments/templates/comments/flag.html | 17 +++ .../templates/comments/flagged.html | 8 ++ app/django_comments/templates/comments/form.html | 21 ++++ app/django_comments/templates/comments/list.html | 10 ++ app/django_comments/templates/comments/posted.html | 8 ++ .../templates/comments/preview.html | 40 +++++++ 12 files changed, 278 insertions(+) create mode 100644 app/django_comments/templates/comments/400-debug.html create mode 100644 app/django_comments/templates/comments/approve.html create mode 100644 app/django_comments/templates/comments/approved.html create mode 100644 app/django_comments/templates/comments/base.html create mode 100644 app/django_comments/templates/comments/delete.html create mode 100644 app/django_comments/templates/comments/deleted.html create mode 100644 app/django_comments/templates/comments/flag.html create mode 100644 app/django_comments/templates/comments/flagged.html create mode 100644 app/django_comments/templates/comments/form.html create mode 100644 app/django_comments/templates/comments/list.html create mode 100644 app/django_comments/templates/comments/posted.html create mode 100644 app/django_comments/templates/comments/preview.html (limited to 'app/django_comments/templates') diff --git a/app/django_comments/templates/comments/400-debug.html b/app/django_comments/templates/comments/400-debug.html new file mode 100644 index 0000000..af74676 --- /dev/null +++ b/app/django_comments/templates/comments/400-debug.html @@ -0,0 +1,116 @@ + + + + + Comment post not allowed (400) + + + + +
+

Comment post not allowed (400)

+ + + + + +
Why:{{ why }}
+
+
+

+ The comment you tried to post to this view wasn't saved because something + tampered with the security information in the comment form. The message + above should explain the problem, or you can check the comment + documentation for more help. +

+
+ +
+

+ You're seeing this error because you have DEBUG = True in + your Django settings file. Change that to False, and Django + will display a standard 400 error page. +

+
+ + diff --git a/app/django_comments/templates/comments/approve.html b/app/django_comments/templates/comments/approve.html new file mode 100644 index 0000000..85b2ba1 --- /dev/null +++ b/app/django_comments/templates/comments/approve.html @@ -0,0 +1,16 @@ +{% extends "comments/base.html" %} +{% load i18n %} + +{% block title %}{% trans "Approve a comment" %}{% endblock %} + +{% block content %} +

{% trans "Really make this comment public?" %}

+
{{ comment|linebreaks }}
+
{% csrf_token %} + {% if next %} +
{% endif %} +

+ or cancel +

+
+{% endblock %} diff --git a/app/django_comments/templates/comments/approved.html b/app/django_comments/templates/comments/approved.html new file mode 100644 index 0000000..d4ba245 --- /dev/null +++ b/app/django_comments/templates/comments/approved.html @@ -0,0 +1,8 @@ +{% extends "comments/base.html" %} +{% load i18n %} + +{% block title %}{% trans "Thanks for approving" %}.{% endblock %} + +{% block content %} +

{% trans "Thanks for taking the time to improve the quality of discussion on our site" %}.

+{% endblock %} diff --git a/app/django_comments/templates/comments/base.html b/app/django_comments/templates/comments/base.html new file mode 100644 index 0000000..540c25c --- /dev/null +++ b/app/django_comments/templates/comments/base.html @@ -0,0 +1,10 @@ + + + + + {% block title %}{% endblock %} + + +{% block content %}{% endblock %} + + diff --git a/app/django_comments/templates/comments/delete.html b/app/django_comments/templates/comments/delete.html new file mode 100644 index 0000000..042442c --- /dev/null +++ b/app/django_comments/templates/comments/delete.html @@ -0,0 +1,16 @@ +{% extends "comments/base.html" %} +{% load i18n %} + +{% block title %}{% trans "Remove a comment" %}{% endblock %} + +{% block content %} +

{% trans "Really remove this comment?" %}

+
{{ comment|linebreaks }}
+
{% csrf_token %} + {% if next %} +
{% endif %} +

+ or cancel +

+
+{% endblock %} diff --git a/app/django_comments/templates/comments/deleted.html b/app/django_comments/templates/comments/deleted.html new file mode 100644 index 0000000..e608481 --- /dev/null +++ b/app/django_comments/templates/comments/deleted.html @@ -0,0 +1,8 @@ +{% extends "comments/base.html" %} +{% load i18n %} + +{% block title %}{% trans "Thanks for removing" %}.{% endblock %} + +{% block content %} +

{% trans "Thanks for taking the time to improve the quality of discussion on our site" %}.

+{% endblock %} diff --git a/app/django_comments/templates/comments/flag.html b/app/django_comments/templates/comments/flag.html new file mode 100644 index 0000000..c5fe743 --- /dev/null +++ b/app/django_comments/templates/comments/flag.html @@ -0,0 +1,17 @@ +{% extends "comments/base.html" %} +{% load i18n %} + +{% block title %}{% trans "Flag this comment" %}{% endblock %} + +{% block content %} +

{% trans "Really flag this comment?" %}

+
{{ comment|linebreaks }}
+
{% csrf_token %} + {% if next %} +
{% endif %} +

+ or cancel +

+
+{% endblock %} diff --git a/app/django_comments/templates/comments/flagged.html b/app/django_comments/templates/comments/flagged.html new file mode 100644 index 0000000..e558019 --- /dev/null +++ b/app/django_comments/templates/comments/flagged.html @@ -0,0 +1,8 @@ +{% extends "comments/base.html" %} +{% load i18n %} + +{% block title %}{% trans "Thanks for flagging" %}.{% endblock %} + +{% block content %} +

{% trans "Thanks for taking the time to improve the quality of discussion on our site" %}.

+{% endblock %} diff --git a/app/django_comments/templates/comments/form.html b/app/django_comments/templates/comments/form.html new file mode 100644 index 0000000..858d5eb --- /dev/null +++ b/app/django_comments/templates/comments/form.html @@ -0,0 +1,21 @@ +{% load comments i18n %} +
{% csrf_token %} + {% if next %} +
{% endif %} + {% for field in form %} + {% if field.is_hidden %} +
{{ field }}
+ {% else %} + {% if field.errors %}{{ field.errors }}{% endif %} + + {% endif %} + {% endfor %} +

+ + +

+
diff --git a/app/django_comments/templates/comments/list.html b/app/django_comments/templates/comments/list.html new file mode 100644 index 0000000..1246adf --- /dev/null +++ b/app/django_comments/templates/comments/list.html @@ -0,0 +1,10 @@ +
+ {% for comment in comment_list %} +
+ {{ comment.submit_date }} - {{ comment.name }} +
+
+

{{ comment.comment }}

+
+ {% endfor %} +
diff --git a/app/django_comments/templates/comments/posted.html b/app/django_comments/templates/comments/posted.html new file mode 100644 index 0000000..76f7f6d --- /dev/null +++ b/app/django_comments/templates/comments/posted.html @@ -0,0 +1,8 @@ +{% extends "comments/base.html" %} +{% load i18n %} + +{% block title %}{% trans "Thanks for commenting" %}.{% endblock %} + +{% block content %} +

{% trans "Thank you for your comment" %}.

+{% endblock %} diff --git a/app/django_comments/templates/comments/preview.html b/app/django_comments/templates/comments/preview.html new file mode 100644 index 0000000..e335466 --- /dev/null +++ b/app/django_comments/templates/comments/preview.html @@ -0,0 +1,40 @@ +{% extends "comments/base.html" %} +{% load i18n %} + +{% block title %}{% trans "Preview your comment" %}{% endblock %} + +{% block content %} + {% load comments %} +
{% csrf_token %} + {% if next %} +
{% endif %} + {% if form.errors %} +

{% blocktrans count counter=form.errors|length %}Please correct the error below{% plural %}Please correct the errors below{% endblocktrans %}

+ {% else %} +

{% trans "Preview your comment" %}

+
{{ comment|linebreaks }}
+

+ {% trans "and" %} + {# Translators: This string follows the 'Post your comment' submit button. #} + {% trans "or make changes" %}: +

+ {% endif %} + {% for field in form %} + {% if field.is_hidden %} +
{{ field }}
+ {% else %} + {% if field.errors %}{{ field.errors }}{% endif %} + + {% endif %} + {% endfor %} +

+ + +

+
+{% endblock %} -- cgit v1.2.3-70-g09d2