commentail 1.3.2__tar.gz → 1.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (296) hide show
  1. {commentail-1.3.2 → commentail-1.4.1}/CHANGELOG.md +33 -0
  2. {commentail-1.3.2/commentail.egg-info → commentail-1.4.1}/PKG-INFO +20 -9
  3. {commentail-1.3.2 → commentail-1.4.1}/README.md +19 -8
  4. {commentail-1.3.2 → commentail-1.4.1}/README.ru.md +21 -10
  5. {commentail-1.3.2 → commentail-1.4.1}/commentail/admission.py +1 -14
  6. commentail-1.4.1/commentail/checks.py +12 -0
  7. commentail-1.4.1/commentail/email.py +148 -0
  8. {commentail-1.3.2 → commentail-1.4.1}/commentail/forms.py +10 -1
  9. commentail-1.4.1/commentail/locale/de/LC_MESSAGES/django.mo +0 -0
  10. {commentail-1.3.2 → commentail-1.4.1}/commentail/locale/de/LC_MESSAGES/django.po +24 -0
  11. commentail-1.4.1/commentail/locale/es/LC_MESSAGES/django.mo +0 -0
  12. {commentail-1.3.2 → commentail-1.4.1}/commentail/locale/es/LC_MESSAGES/django.po +24 -0
  13. commentail-1.4.1/commentail/locale/fr/LC_MESSAGES/django.mo +0 -0
  14. {commentail-1.3.2 → commentail-1.4.1}/commentail/locale/fr/LC_MESSAGES/django.po +24 -0
  15. commentail-1.4.1/commentail/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
  16. {commentail-1.3.2 → commentail-1.4.1}/commentail/locale/pt_BR/LC_MESSAGES/django.po +24 -0
  17. commentail-1.4.1/commentail/locale/ru/LC_MESSAGES/django.mo +0 -0
  18. {commentail-1.3.2 → commentail-1.4.1}/commentail/locale/ru/LC_MESSAGES/django.po +24 -0
  19. commentail-1.4.1/commentail/management/commands/test_commentail_email.py +57 -0
  20. commentail-1.4.1/commentail/migrations/0019_moderation_rule_reason.py +20 -0
  21. {commentail-1.3.2 → commentail-1.4.1}/commentail/models.py +1 -0
  22. {commentail-1.3.2 → commentail-1.4.1}/commentail/outbox.py +12 -4
  23. {commentail-1.3.2 → commentail-1.4.1}/commentail/policies.py +36 -17
  24. {commentail-1.3.2 → commentail-1.4.1}/commentail/rules_csv.py +45 -10
  25. {commentail-1.3.2 → commentail-1.4.1}/commentail/services.py +16 -3
  26. {commentail-1.3.2 → commentail-1.4.1}/commentail/static/commentail/admin.css +1 -0
  27. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/admin/rules_import.html +5 -3
  28. {commentail-1.3.2 → commentail-1.4.1/commentail.egg-info}/PKG-INFO +20 -9
  29. {commentail-1.3.2 → commentail-1.4.1}/commentail.egg-info/SOURCES.txt +17 -0
  30. commentail-1.4.1/docs/releases/1.4.0.md +85 -0
  31. commentail-1.4.1/docs/releases/1.4.0.ru.md +88 -0
  32. commentail-1.4.1/docs/releases/1.4.1.md +23 -0
  33. commentail-1.4.1/docs/releases/1.4.1.ru.md +24 -0
  34. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Changelog.md +33 -0
  35. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Configuration.md +5 -1
  36. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Email-and-worker.md +9 -4
  37. commentail-1.4.1/docs/wiki/Email-configuration-ru.md +159 -0
  38. commentail-1.4.1/docs/wiki/Email-configuration.md +156 -0
  39. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Guest-comments.md +8 -1
  40. commentail-1.4.1/docs/wiki/Home-ru.md +87 -0
  41. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Home.md +19 -3
  42. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Installation.md +5 -4
  43. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Moderation.md +5 -1
  44. commentail-1.4.1/docs/wiki/Release-1.4.0-ru.md +88 -0
  45. commentail-1.4.1/docs/wiki/Release-1.4.0.md +85 -0
  46. commentail-1.4.1/docs/wiki/Release-1.4.1-ru.md +24 -0
  47. commentail-1.4.1/docs/wiki/Release-1.4.1.md +23 -0
  48. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Roadmap.md +25 -14
  49. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Rules-and-CSV.md +23 -7
  50. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Stability.md +4 -1
  51. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Troubleshooting.md +2 -0
  52. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/_Sidebar.md +9 -0
  53. {commentail-1.3.2 → commentail-1.4.1}/pyproject.toml +1 -1
  54. {commentail-1.3.2 → commentail-1.4.1}/tests/test_content_checks.py +3 -3
  55. commentail-1.4.1/tests/test_early_rejection.py +175 -0
  56. commentail-1.4.1/tests/test_independent_email.py +568 -0
  57. {commentail-1.3.2 → commentail-1.4.1}/tests/test_lifecycle.py +9 -11
  58. {commentail-1.3.2 → commentail-1.4.1}/tests/test_rules_admin.py +8 -1
  59. {commentail-1.3.2 → commentail-1.4.1}/tests/test_rules_csv.py +47 -0
  60. commentail-1.4.1/tests/test_test_email_command.py +149 -0
  61. commentail-1.3.2/commentail/checks.py +0 -8
  62. commentail-1.3.2/commentail/locale/de/LC_MESSAGES/django.mo +0 -0
  63. commentail-1.3.2/commentail/locale/es/LC_MESSAGES/django.mo +0 -0
  64. commentail-1.3.2/commentail/locale/fr/LC_MESSAGES/django.mo +0 -0
  65. commentail-1.3.2/commentail/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
  66. commentail-1.3.2/commentail/locale/ru/LC_MESSAGES/django.mo +0 -0
  67. {commentail-1.3.2 → commentail-1.4.1}/LICENSE +0 -0
  68. {commentail-1.3.2 → commentail-1.4.1}/MANIFEST.in +0 -0
  69. {commentail-1.3.2 → commentail-1.4.1}/commentail/__init__.py +0 -0
  70. {commentail-1.3.2 → commentail-1.4.1}/commentail/admin_queries.py +0 -0
  71. {commentail-1.3.2 → commentail-1.4.1}/commentail/admin_settings.py +0 -0
  72. {commentail-1.3.2 → commentail-1.4.1}/commentail/admin_urls.py +0 -0
  73. {commentail-1.3.2 → commentail-1.4.1}/commentail/admin_views.py +0 -0
  74. {commentail-1.3.2 → commentail-1.4.1}/commentail/antispam.py +0 -0
  75. {commentail-1.3.2 → commentail-1.4.1}/commentail/apps.py +0 -0
  76. {commentail-1.3.2 → commentail-1.4.1}/commentail/assets.py +0 -0
  77. {commentail-1.3.2 → commentail-1.4.1}/commentail/author_access.py +0 -0
  78. {commentail-1.3.2 → commentail-1.4.1}/commentail/avatars.py +0 -0
  79. {commentail-1.3.2 → commentail-1.4.1}/commentail/background.py +0 -0
  80. {commentail-1.3.2 → commentail-1.4.1}/commentail/captcha_providers.py +0 -0
  81. {commentail-1.3.2 → commentail-1.4.1}/commentail/config.py +0 -0
  82. {commentail-1.3.2 → commentail-1.4.1}/commentail/content_checks.py +0 -0
  83. {commentail-1.3.2 → commentail-1.4.1}/commentail/detection.py +0 -0
  84. {commentail-1.3.2 → commentail-1.4.1}/commentail/drafts.py +0 -0
  85. {commentail-1.3.2 → commentail-1.4.1}/commentail/fingerprints.py +0 -0
  86. {commentail-1.3.2 → commentail-1.4.1}/commentail/group_permissions.py +0 -0
  87. {commentail-1.3.2 → commentail-1.4.1}/commentail/limits.py +0 -0
  88. {commentail-1.3.2 → commentail-1.4.1}/commentail/logging.py +0 -0
  89. {commentail-1.3.2 → commentail-1.4.1}/commentail/mail_access.py +0 -0
  90. {commentail-1.3.2 → commentail-1.4.1}/commentail/management/__init__.py +0 -0
  91. {commentail-1.3.2 → commentail-1.4.1}/commentail/management/commands/__init__.py +0 -0
  92. {commentail-1.3.2 → commentail-1.4.1}/commentail/management/commands/process_commentail.py +0 -0
  93. {commentail-1.3.2 → commentail-1.4.1}/commentail/middleware.py +0 -0
  94. {commentail-1.3.2 → commentail-1.4.1}/commentail/migrations/0001_initial.py +0 -0
  95. {commentail-1.3.2 → commentail-1.4.1}/commentail/migrations/0002_sitegrouppermission_hide_sitegrouppermission_view.py +0 -0
  96. {commentail-1.3.2 → commentail-1.4.1}/commentail/migrations/0003_actiontoken_captchachallenge_guestgrant.py +0 -0
  97. {commentail-1.3.2 → commentail-1.4.1}/commentail/migrations/0004_submissionrecord.py +0 -0
  98. {commentail-1.3.2 → commentail-1.4.1}/commentail/migrations/0005_rateevent.py +0 -0
  99. {commentail-1.3.2 → commentail-1.4.1}/commentail/migrations/0006_alter_comment_guest_name_and_more.py +0 -0
  100. {commentail-1.3.2 → commentail-1.4.1}/commentail/migrations/0007_actiontoken_nonce_replysubscription_mailjob.py +0 -0
  101. {commentail-1.3.2 → commentail-1.4.1}/commentail/migrations/0008_mailjob_revision.py +0 -0
  102. {commentail-1.3.2 → commentail-1.4.1}/commentail/migrations/0009_formticket.py +0 -0
  103. {commentail-1.3.2 → commentail-1.4.1}/commentail/migrations/0010_captchachallenge_backend_and_more.py +0 -0
  104. {commentail-1.3.2 → commentail-1.4.1}/commentail/migrations/0011_discussion_content_type_discussion_object_id_and_more.py +0 -0
  105. {commentail-1.3.2 → commentail-1.4.1}/commentail/migrations/0012_formticket_draft.py +0 -0
  106. {commentail-1.3.2 → commentail-1.4.1}/commentail/migrations/0013_sitecommentsettings_email_enabled.py +0 -0
  107. {commentail-1.3.2 → commentail-1.4.1}/commentail/migrations/0014_reading_indexes.py +0 -0
  108. {commentail-1.3.2 → commentail-1.4.1}/commentail/migrations/0015_sitecommentsettings_highlight_staff.py +0 -0
  109. {commentail-1.3.2 → commentail-1.4.1}/commentail/migrations/0016_guest_antispam.py +0 -0
  110. {commentail-1.3.2 → commentail-1.4.1}/commentail/migrations/0017_revision_spam_signals.py +0 -0
  111. {commentail-1.3.2 → commentail-1.4.1}/commentail/migrations/0018_private_fingerprints.py +0 -0
  112. {commentail-1.3.2 → commentail-1.4.1}/commentail/migrations/__init__.py +0 -0
  113. {commentail-1.3.2 → commentail-1.4.1}/commentail/objects.py +0 -0
  114. {commentail-1.3.2 → commentail-1.4.1}/commentail/page_access.py +0 -0
  115. {commentail-1.3.2 → commentail-1.4.1}/commentail/page_integration.py +0 -0
  116. {commentail-1.3.2 → commentail-1.4.1}/commentail/panels.py +0 -0
  117. {commentail-1.3.2 → commentail-1.4.1}/commentail/permissions.py +0 -0
  118. {commentail-1.3.2 → commentail-1.4.1}/commentail/presentation.py +0 -0
  119. {commentail-1.3.2 → commentail-1.4.1}/commentail/public.py +0 -0
  120. {commentail-1.3.2 → commentail-1.4.1}/commentail/reading.py +0 -0
  121. {commentail-1.3.2 → commentail-1.4.1}/commentail/recent.py +0 -0
  122. {commentail-1.3.2 → commentail-1.4.1}/commentail/security.py +0 -0
  123. {commentail-1.3.2 → commentail-1.4.1}/commentail/signals.py +0 -0
  124. {commentail-1.3.2 → commentail-1.4.1}/commentail/static/commentail/admin.js +0 -0
  125. {commentail-1.3.2 → commentail-1.4.1}/commentail/static/commentail/commentail.css +0 -0
  126. {commentail-1.3.2 → commentail-1.4.1}/commentail/static/commentail/commentail.js +0 -0
  127. {commentail-1.3.2 → commentail-1.4.1}/commentail/structured.py +0 -0
  128. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/action.html +0 -0
  129. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/admin/action_error.html +0 -0
  130. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/admin/base.html +0 -0
  131. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/admin/confirm_delete.html +0 -0
  132. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/admin/detail.html +0 -0
  133. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/admin/field.html +0 -0
  134. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/admin/form.html +0 -0
  135. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/admin/group_permission_row.html +0 -0
  136. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/admin/group_permissions.html +0 -0
  137. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/admin/heading.html +0 -0
  138. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/admin/list.html +0 -0
  139. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/admin/mail.html +0 -0
  140. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/admin/management.html +0 -0
  141. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/admin/objects.html +0 -0
  142. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/admin/page_panel.html +0 -0
  143. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/admin/rules.html +0 -0
  144. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/admin/selection.html +0 -0
  145. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/author.html +0 -0
  146. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/avatar.html +0 -0
  147. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/base.html +0 -0
  148. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/block.html +0 -0
  149. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/captcha.html +0 -0
  150. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/comment.html +0 -0
  151. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/edit-form.html +0 -0
  152. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/emails/base.html +0 -0
  153. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/emails/button.html +0 -0
  154. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/emails/confirm.html +0 -0
  155. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/emails/confirm.txt +0 -0
  156. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/emails/confirm_subject.txt +0 -0
  157. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/emails/edit.html +0 -0
  158. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/emails/edit.txt +0 -0
  159. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/emails/edit_subject.txt +0 -0
  160. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/emails/published.html +0 -0
  161. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/emails/published.txt +0 -0
  162. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/emails/published_subject.txt +0 -0
  163. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/emails/rejected.html +0 -0
  164. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/emails/rejected.txt +0 -0
  165. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/emails/rejected_subject.txt +0 -0
  166. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/emails/reply.html +0 -0
  167. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/emails/reply.txt +0 -0
  168. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/emails/reply_subject.txt +0 -0
  169. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/form.html +0 -0
  170. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/provider-captcha.html +0 -0
  171. {commentail-1.3.2 → commentail-1.4.1}/commentail/templates/commentail/replies.html +0 -0
  172. {commentail-1.3.2 → commentail-1.4.1}/commentail/templatetags/__init__.py +0 -0
  173. {commentail-1.3.2 → commentail-1.4.1}/commentail/templatetags/commentail_admin.py +0 -0
  174. {commentail-1.3.2 → commentail-1.4.1}/commentail/templatetags/commentail_tags.py +0 -0
  175. {commentail-1.3.2 → commentail-1.4.1}/commentail/text.py +0 -0
  176. {commentail-1.3.2 → commentail-1.4.1}/commentail/urls.py +0 -0
  177. {commentail-1.3.2 → commentail-1.4.1}/commentail/validation.py +0 -0
  178. {commentail-1.3.2 → commentail-1.4.1}/commentail/views.py +0 -0
  179. {commentail-1.3.2 → commentail-1.4.1}/commentail/wagtail_hooks.py +0 -0
  180. {commentail-1.3.2 → commentail-1.4.1}/commentail/widget.py +0 -0
  181. {commentail-1.3.2 → commentail-1.4.1}/commentail.egg-info/dependency_links.txt +0 -0
  182. {commentail-1.3.2 → commentail-1.4.1}/commentail.egg-info/requires.txt +0 -0
  183. {commentail-1.3.2 → commentail-1.4.1}/commentail.egg-info/top_level.txt +0 -0
  184. {commentail-1.3.2 → commentail-1.4.1}/docs/assets/commentail-preview.png +0 -0
  185. {commentail-1.3.2 → commentail-1.4.1}/docs/assets/support-qr.png +0 -0
  186. {commentail-1.3.2 → commentail-1.4.1}/docs/releases/0.1.0.md +0 -0
  187. {commentail-1.3.2 → commentail-1.4.1}/docs/releases/0.1.1.md +0 -0
  188. {commentail-1.3.2 → commentail-1.4.1}/docs/releases/0.2.0.md +0 -0
  189. {commentail-1.3.2 → commentail-1.4.1}/docs/releases/1.0.0.md +0 -0
  190. {commentail-1.3.2 → commentail-1.4.1}/docs/releases/1.1.0.md +0 -0
  191. {commentail-1.3.2 → commentail-1.4.1}/docs/releases/1.2.0.md +0 -0
  192. {commentail-1.3.2 → commentail-1.4.1}/docs/releases/1.3.0.md +0 -0
  193. {commentail-1.3.2 → commentail-1.4.1}/docs/releases/1.3.1.md +0 -0
  194. {commentail-1.3.2 → commentail-1.4.1}/docs/releases/1.3.2.md +0 -0
  195. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Callbacks.md +0 -0
  196. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Deployment.md +0 -0
  197. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Example-and-testing.md +0 -0
  198. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Object-adapters.md +0 -0
  199. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Performance.md +0 -0
  200. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Recent-comments.md +0 -0
  201. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Release-0.1.0.md +0 -0
  202. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Release-0.1.1.md +0 -0
  203. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Release-0.2.0.md +0 -0
  204. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Release-1.0.0.md +0 -0
  205. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Release-1.1.0.md +0 -0
  206. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Release-1.2.0.md +0 -0
  207. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Release-1.3.0.md +0 -0
  208. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Release-1.3.1.md +0 -0
  209. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Release-1.3.2.md +0 -0
  210. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Replies-and-editing.md +0 -0
  211. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Security-and-privacy.md +0 -0
  212. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Structured-data.md +0 -0
  213. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Styling.md +0 -0
  214. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Support.md +0 -0
  215. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Template-contract.md +0 -0
  216. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/Templates.md +0 -0
  217. {commentail-1.3.2 → commentail-1.4.1}/docs/wiki/_Footer.md +0 -0
  218. {commentail-1.3.2 → commentail-1.4.1}/example/README.md +0 -0
  219. {commentail-1.3.2 → commentail-1.4.1}/example/demo/__init__.py +0 -0
  220. {commentail-1.3.2 → commentail-1.4.1}/example/demo/settings.py +0 -0
  221. {commentail-1.3.2 → commentail-1.4.1}/example/demo/urls.py +0 -0
  222. {commentail-1.3.2 → commentail-1.4.1}/example/demo_home/__init__.py +0 -0
  223. {commentail-1.3.2 → commentail-1.4.1}/example/demo_home/comments.py +0 -0
  224. {commentail-1.3.2 → commentail-1.4.1}/example/demo_home/management/__init__.py +0 -0
  225. {commentail-1.3.2 → commentail-1.4.1}/example/demo_home/management/commands/__init__.py +0 -0
  226. {commentail-1.3.2 → commentail-1.4.1}/example/demo_home/management/commands/bootstrap_demo.py +0 -0
  227. {commentail-1.3.2 → commentail-1.4.1}/example/demo_home/migrations/0001_initial.py +0 -0
  228. {commentail-1.3.2 → commentail-1.4.1}/example/demo_home/migrations/0002_product.py +0 -0
  229. {commentail-1.3.2 → commentail-1.4.1}/example/demo_home/migrations/__init__.py +0 -0
  230. {commentail-1.3.2 → commentail-1.4.1}/example/demo_home/models.py +0 -0
  231. {commentail-1.3.2 → commentail-1.4.1}/example/demo_home/templates/demo_home/home_page.html +0 -0
  232. {commentail-1.3.2 → commentail-1.4.1}/example/demo_home/templates/demo_home/product.html +0 -0
  233. {commentail-1.3.2 → commentail-1.4.1}/example/demo_home/views.py +0 -0
  234. {commentail-1.3.2 → commentail-1.4.1}/example/manage.py +0 -0
  235. {commentail-1.3.2 → commentail-1.4.1}/requirements-test-common.txt +0 -0
  236. {commentail-1.3.2 → commentail-1.4.1}/requirements-test.txt +0 -0
  237. {commentail-1.3.2 → commentail-1.4.1}/setup.cfg +0 -0
  238. {commentail-1.3.2 → commentail-1.4.1}/tests/__init__.py +0 -0
  239. {commentail-1.3.2 → commentail-1.4.1}/tests/settings.py +0 -0
  240. {commentail-1.3.2 → commentail-1.4.1}/tests/targets/__init__.py +0 -0
  241. {commentail-1.3.2 → commentail-1.4.1}/tests/targets/apps.py +0 -0
  242. {commentail-1.3.2 → commentail-1.4.1}/tests/targets/migrations/0001_initial.py +0 -0
  243. {commentail-1.3.2 → commentail-1.4.1}/tests/targets/migrations/__init__.py +0 -0
  244. {commentail-1.3.2 → commentail-1.4.1}/tests/targets/models.py +0 -0
  245. {commentail-1.3.2 → commentail-1.4.1}/tests/templates/wagtailcore/page.html +0 -0
  246. {commentail-1.3.2 → commentail-1.4.1}/tests/test_actions.py +0 -0
  247. {commentail-1.3.2 → commentail-1.4.1}/tests/test_admin.js +0 -0
  248. {commentail-1.3.2 → commentail-1.4.1}/tests/test_admin_ui.py +0 -0
  249. {commentail-1.3.2 → commentail-1.4.1}/tests/test_admission.py +0 -0
  250. {commentail-1.3.2 → commentail-1.4.1}/tests/test_antispam.py +0 -0
  251. {commentail-1.3.2 → commentail-1.4.1}/tests/test_avatars.py +0 -0
  252. {commentail-1.3.2 → commentail-1.4.1}/tests/test_background.py +0 -0
  253. {commentail-1.3.2 → commentail-1.4.1}/tests/test_capability_access.py +0 -0
  254. {commentail-1.3.2 → commentail-1.4.1}/tests/test_captcha_backend.py +0 -0
  255. {commentail-1.3.2 → commentail-1.4.1}/tests/test_captcha_providers.py +0 -0
  256. {commentail-1.3.2 → commentail-1.4.1}/tests/test_cleanup.py +0 -0
  257. {commentail-1.3.2 → commentail-1.4.1}/tests/test_concurrency.py +0 -0
  258. {commentail-1.3.2 → commentail-1.4.1}/tests/test_detection.py +0 -0
  259. {commentail-1.3.2 → commentail-1.4.1}/tests/test_email_backends.py +0 -0
  260. {commentail-1.3.2 → commentail-1.4.1}/tests/test_email_presentation.py +0 -0
  261. {commentail-1.3.2 → commentail-1.4.1}/tests/test_extension_contracts.py +0 -0
  262. {commentail-1.3.2 → commentail-1.4.1}/tests/test_fingerprints.py +0 -0
  263. {commentail-1.3.2 → commentail-1.4.1}/tests/test_form_issuance_limits.py +0 -0
  264. {commentail-1.3.2 → commentail-1.4.1}/tests/test_group_panel.py +0 -0
  265. {commentail-1.3.2 → commentail-1.4.1}/tests/test_inline_edit.py +0 -0
  266. {commentail-1.3.2 → commentail-1.4.1}/tests/test_input_boundaries.py +0 -0
  267. {commentail-1.3.2 → commentail-1.4.1}/tests/test_localization.py +0 -0
  268. {commentail-1.3.2 → commentail-1.4.1}/tests/test_mail_admin.py +0 -0
  269. {commentail-1.3.2 → commentail-1.4.1}/tests/test_name_limit.js +0 -0
  270. {commentail-1.3.2 → commentail-1.4.1}/tests/test_notifications.py +0 -0
  271. {commentail-1.3.2 → commentail-1.4.1}/tests/test_object_adapters.py +0 -0
  272. {commentail-1.3.2 → commentail-1.4.1}/tests/test_outbox.py +0 -0
  273. {commentail-1.3.2 → commentail-1.4.1}/tests/test_performance.py +0 -0
  274. {commentail-1.3.2 → commentail-1.4.1}/tests/test_presentation_contracts.py +0 -0
  275. {commentail-1.3.2 → commentail-1.4.1}/tests/test_progressive.js +0 -0
  276. {commentail-1.3.2 → commentail-1.4.1}/tests/test_provider_widgets.js +0 -0
  277. {commentail-1.3.2 → commentail-1.4.1}/tests/test_public_ui.py +0 -0
  278. {commentail-1.3.2 → commentail-1.4.1}/tests/test_rate_limits.py +0 -0
  279. {commentail-1.3.2 → commentail-1.4.1}/tests/test_reading_contracts.py +0 -0
  280. {commentail-1.3.2 → commentail-1.4.1}/tests/test_recent_comments.py +0 -0
  281. {commentail-1.3.2 → commentail-1.4.1}/tests/test_registry_diagnostics.py +0 -0
  282. {commentail-1.3.2 → commentail-1.4.1}/tests/test_release_gaps.py +0 -0
  283. {commentail-1.3.2 → commentail-1.4.1}/tests/test_reply.js +0 -0
  284. {commentail-1.3.2 → commentail-1.4.1}/tests/test_security.py +0 -0
  285. {commentail-1.3.2 → commentail-1.4.1}/tests/test_security_boundaries.py +0 -0
  286. {commentail-1.3.2 → commentail-1.4.1}/tests/test_smtp_chain.py +0 -0
  287. {commentail-1.3.2 → commentail-1.4.1}/tests/test_staff_authors.py +0 -0
  288. {commentail-1.3.2 → commentail-1.4.1}/tests/test_structured_data.py +0 -0
  289. {commentail-1.3.2 → commentail-1.4.1}/tests/test_submission.py +0 -0
  290. {commentail-1.3.2 → commentail-1.4.1}/tests/test_transaction_contracts.py +0 -0
  291. {commentail-1.3.2 → commentail-1.4.1}/tests/test_translated_site_roots.py +0 -0
  292. {commentail-1.3.2 → commentail-1.4.1}/tests/urls.py +0 -0
  293. {commentail-1.3.2 → commentail-1.4.1}/tests/urls_custom_prefix.py +0 -0
  294. {commentail-1.3.2 → commentail-1.4.1}/tools/benchmark_performance.py +0 -0
  295. {commentail-1.3.2 → commentail-1.4.1}/tools/check_dist.py +0 -0
  296. {commentail-1.3.2 → commentail-1.4.1}/tools/check_translations.py +0 -0
@@ -3,6 +3,39 @@
3
3
  Each release records changes relative to the previous version. Upgrade notes
4
4
  describe changes that an existing installation needs to review.
5
5
 
6
+ ## [1.4.1] — 2026-10-26 · Package description correction
7
+
8
+ - Publish the corrected README and current installation commands on PyPI. The
9
+ 1.4.0 archives retained earlier candidate wording and 1.3.2 install examples.
10
+ - No runtime, dependency or migration changes relative to 1.4.0. Existing 1.4.0
11
+ installations do not need any additional migration or configuration change.
12
+
13
+ See [1.4.1 release notes](docs/releases/1.4.1.md)
14
+ ([на русском](docs/releases/1.4.1.ru.md)).
15
+
16
+ ## [1.4.0] — 2026-10-26 · Independent email and early rule rejection
17
+
18
+ - Add project-wide `COMMENTAIL_EMAIL` settings for an independent Django email
19
+ backend, constructor options and sender while preserving shared Django mail
20
+ when no override is configured. Validate configuration without constructing
21
+ or contacting the transport; keep provider response text out of queue errors.
22
+ - Preserve the existing outbox, retries, leases, access checks and SMTP timeout
23
+ limits. Pending jobs use the active configuration at processing time; explicit
24
+ transport failures never fall back to the shared backend.
25
+ - Add English/Russian setup and upgrade guidance with separate SMTP and optional
26
+ API-provider examples. No new dependency.
27
+ - Add `test_commentail_email --to` for direct transport verification without
28
+ comments or queue jobs, with redacted errors and explicit delivery limits.
29
+ - Refuse new guest text matching enabled Reject rules in Apply rules mode before
30
+ creating confirmation mail. Preserve private drafts, CAPTCHA and attempt limits.
31
+ - Add optional 2000-character rule reasons, lowest-ID reason priority and a
32
+ localized fallback; apply schema migration `0019_moderation_rule_reason`.
33
+ - Export CSV reasons and accept the optional column on import. Legacy files
34
+ preserve existing reasons; an explicitly empty cell clears one.
35
+
36
+ See [1.4.0 changes and upgrade notes](docs/releases/1.4.0.md)
37
+ ([на русском](docs/releases/1.4.0.ru.md)).
38
+
6
39
  ## [1.3.2] — 2026-10-23 · Translated Site roots
7
40
 
8
41
  - Restore Page discussions under translated Site homepages when Wagtail content
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: commentail
3
- Version: 1.3.2
3
+ Version: 1.4.1
4
4
  Summary: Self-hosted Wagtail comments with moderation, verified guests and threaded replies
5
5
  License-Expression: MIT
6
6
  Project-URL: Source, https://github.com/hardcodd/Commentail
@@ -34,19 +34,23 @@ Dynamic: license-file
34
34
 
35
35
  Moderated discussions, verified guests and inline replies — styled by your site.
36
36
 
37
- **Current release: [1.3.2](https://github.com/hardcodd/Commentail/releases/tag/v1.3.2)** · [PyPI](https://pypi.org/project/commentail/1.3.2/)
37
+ **Current release: [1.4.1](https://github.com/hardcodd/Commentail/releases/tag/v1.4.1)** · [PyPI](https://pypi.org/project/commentail/1.4.1/)
38
38
 
39
- [1.3.2 restores discussions under translated Site homepages](docs/releases/1.3.2.md).
40
- There is no new migration over 1.3.1. Upgrading from 1.3.0 or earlier includes
41
- the [irreversible 1.3.1 fingerprint migration](docs/releases/1.3.1.md);
42
- review its backup, downtime and form-quota guidance first.
39
+ [Separate email configuration](docs/wiki/Email-configuration.md) lets Commentail use
40
+ its own backend, connection options and sender while ordinary Django mail keeps
41
+ its existing settings. Version 1.4.0 also adds a test-mail command and early guest
42
+ rejection by hard rules, with optional reasons and legacy-compatible CSV import.
43
+ Patch 1.4.1 corrects the PyPI description; runtime is unchanged from 1.4.0.
44
+ Apply migration `0019`; see the [changes and upgrade notes](docs/releases/1.4.0.md).
45
+ Upgrading from 1.3.0 or earlier also requires the
46
+ [irreversible 1.3.1 migration procedure](docs/releases/1.3.1.md).
43
47
 
44
48
  [![Tests and distributions](https://github.com/hardcodd/Commentail/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/hardcodd/Commentail/actions/workflows/tests.yml)
45
49
  [![Django Packages · Commentail](https://img.shields.io/badge/Django%20Packages-Commentail-0C4B33.svg)](https://djangopackages.org/packages/p/commentail/)
46
50
 
47
51
  English · [Русский](README.ru.md)
48
52
 
49
- [Get started](#quick-start) · [Screenshots](#screenshots) · [Documentation](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Home.md) · [Wiki](https://github.com/hardcodd/Commentail/wiki) · [Support](#support-commentail)
53
+ [Get started](#quick-start) · [Course](https://hardcodd.net/en/blog/?series=commentail-tutorials) · [Screenshots](#screenshots) · [Documentation](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Home.md) · [Wiki](https://github.com/hardcodd/Commentail/wiki) · [Support](#support-commentail)
50
54
 
51
55
  <img src="https://raw.githubusercontent.com/hardcodd/Commentail/main/docs/assets/commentail-preview.png" alt="Commentail — a blue bird perched on a comment bubble" width="100%">
52
56
 
@@ -176,11 +180,11 @@ The guides are in English; this README is also [available in Russian](README.ru.
176
180
  In your existing Wagtail site's virtual environment, install the published release:
177
181
 
178
182
  ```sh
179
- python -m pip install commentail==1.3.2
183
+ python -m pip install commentail==1.4.1
180
184
  ```
181
185
 
182
186
  For the optional PostgreSQL driver, use
183
- `python -m pip install 'commentail[postgres]==1.3.2'`.
187
+ `python -m pip install 'commentail[postgres]==1.4.1'`.
184
188
  For an existing installation, follow
185
189
  the [upgrade guide](docs/wiki/Installation.md#upgrading-and-restoring) for your target version.
186
190
 
@@ -226,6 +230,9 @@ The command sends queued mail and removes expired temporary records. Guests conf
226
230
  their email before moderation. Authors with email are subscribed to direct-reply
227
231
  notifications when mail is enabled; every reply email includes per-comment unsubscribe.
228
232
 
233
+ Version 1.4.0 refuses matching hard-rule guest submissions before email
234
+ proof, preserving the draft. See [rules and CSV](docs/wiki/Rules-and-CSV.md).
235
+
229
236
  You can configure an API-based Django backend and schedule
230
237
  `commentail.background.process_pending()` in your project's queue instead of a
231
238
  separate command job. Choose one schedule. Backend acceptance does not prove inbox
@@ -275,6 +282,10 @@ settings use a single `COMMENTAIL` dictionary with `default` and hostname overri
275
282
 
276
283
  ## Documentation by task
277
284
 
285
+ The [22-lesson Commentail course](https://hardcodd.net/en/blog/?series=commentail-tutorials)
286
+ walks through installation, email delivery, CAPTCHA, customization and production setup
287
+ with step-by-step examples.
288
+
278
289
  The [Wiki](https://github.com/hardcodd/Commentail/wiki) and the [versioned guides](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Home.md)
279
290
  cover the same topics. Start with the task you need:
280
291
 
@@ -6,19 +6,23 @@
6
6
 
7
7
  Moderated discussions, verified guests and inline replies — styled by your site.
8
8
 
9
- **Current release: [1.3.2](https://github.com/hardcodd/Commentail/releases/tag/v1.3.2)** · [PyPI](https://pypi.org/project/commentail/1.3.2/)
9
+ **Current release: [1.4.1](https://github.com/hardcodd/Commentail/releases/tag/v1.4.1)** · [PyPI](https://pypi.org/project/commentail/1.4.1/)
10
10
 
11
- [1.3.2 restores discussions under translated Site homepages](docs/releases/1.3.2.md).
12
- There is no new migration over 1.3.1. Upgrading from 1.3.0 or earlier includes
13
- the [irreversible 1.3.1 fingerprint migration](docs/releases/1.3.1.md);
14
- review its backup, downtime and form-quota guidance first.
11
+ [Separate email configuration](docs/wiki/Email-configuration.md) lets Commentail use
12
+ its own backend, connection options and sender while ordinary Django mail keeps
13
+ its existing settings. Version 1.4.0 also adds a test-mail command and early guest
14
+ rejection by hard rules, with optional reasons and legacy-compatible CSV import.
15
+ Patch 1.4.1 corrects the PyPI description; runtime is unchanged from 1.4.0.
16
+ Apply migration `0019`; see the [changes and upgrade notes](docs/releases/1.4.0.md).
17
+ Upgrading from 1.3.0 or earlier also requires the
18
+ [irreversible 1.3.1 migration procedure](docs/releases/1.3.1.md).
15
19
 
16
20
  [![Tests and distributions](https://github.com/hardcodd/Commentail/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/hardcodd/Commentail/actions/workflows/tests.yml)
17
21
  [![Django Packages · Commentail](https://img.shields.io/badge/Django%20Packages-Commentail-0C4B33.svg)](https://djangopackages.org/packages/p/commentail/)
18
22
 
19
23
  English · [Русский](README.ru.md)
20
24
 
21
- [Get started](#quick-start) · [Screenshots](#screenshots) · [Documentation](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Home.md) · [Wiki](https://github.com/hardcodd/Commentail/wiki) · [Support](#support-commentail)
25
+ [Get started](#quick-start) · [Course](https://hardcodd.net/en/blog/?series=commentail-tutorials) · [Screenshots](#screenshots) · [Documentation](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Home.md) · [Wiki](https://github.com/hardcodd/Commentail/wiki) · [Support](#support-commentail)
22
26
 
23
27
  <img src="https://raw.githubusercontent.com/hardcodd/Commentail/main/docs/assets/commentail-preview.png" alt="Commentail — a blue bird perched on a comment bubble" width="100%">
24
28
 
@@ -148,11 +152,11 @@ The guides are in English; this README is also [available in Russian](README.ru.
148
152
  In your existing Wagtail site's virtual environment, install the published release:
149
153
 
150
154
  ```sh
151
- python -m pip install commentail==1.3.2
155
+ python -m pip install commentail==1.4.1
152
156
  ```
153
157
 
154
158
  For the optional PostgreSQL driver, use
155
- `python -m pip install 'commentail[postgres]==1.3.2'`.
159
+ `python -m pip install 'commentail[postgres]==1.4.1'`.
156
160
  For an existing installation, follow
157
161
  the [upgrade guide](docs/wiki/Installation.md#upgrading-and-restoring) for your target version.
158
162
 
@@ -198,6 +202,9 @@ The command sends queued mail and removes expired temporary records. Guests conf
198
202
  their email before moderation. Authors with email are subscribed to direct-reply
199
203
  notifications when mail is enabled; every reply email includes per-comment unsubscribe.
200
204
 
205
+ Version 1.4.0 refuses matching hard-rule guest submissions before email
206
+ proof, preserving the draft. See [rules and CSV](docs/wiki/Rules-and-CSV.md).
207
+
201
208
  You can configure an API-based Django backend and schedule
202
209
  `commentail.background.process_pending()` in your project's queue instead of a
203
210
  separate command job. Choose one schedule. Backend acceptance does not prove inbox
@@ -247,6 +254,10 @@ settings use a single `COMMENTAIL` dictionary with `default` and hostname overri
247
254
 
248
255
  ## Documentation by task
249
256
 
257
+ The [22-lesson Commentail course](https://hardcodd.net/en/blog/?series=commentail-tutorials)
258
+ walks through installation, email delivery, CAPTCHA, customization and production setup
259
+ with step-by-step examples.
260
+
250
261
  The [Wiki](https://github.com/hardcodd/Commentail/wiki) and the [versioned guides](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Home.md)
251
262
  cover the same topics. Start with the task you need:
252
263
 
@@ -6,19 +6,23 @@
6
6
 
7
7
  Модерация обсуждений, подтверждённые гости и ответы рядом с комментарием — в стиле вашего сайта.
8
8
 
9
- **Текущая версия: [1.3.2](https://github.com/hardcodd/Commentail/releases/tag/v1.3.2)** · [PyPI](https://pypi.org/project/commentail/1.3.2/)
9
+ **Текущая версия: [1.4.1](https://github.com/hardcodd/Commentail/releases/tag/v1.4.1)** · [PyPI](https://pypi.org/project/commentail/1.4.1/)
10
10
 
11
- [1.3.2 восстанавливает обсуждения под переводами главной страницы Site](docs/releases/1.3.2.md).
12
- После 1.3.1 новой миграции нет. Обновление с 1.3.0 или более ранней версии
13
- включает [необратимую миграцию отпечатков из 1.3.1](docs/releases/1.3.1.md);
14
- заранее проверьте рекомендации о резервной копии, остановке записи и лимитах выдачи форм.
11
+ [Отдельная настройка почты](docs/wiki/Email-configuration-ru.md) позволяет выбрать
12
+ backend, параметры подключения и отправителя Commentail, сохранив обычную почту
13
+ Django. Версия 1.4.0 также добавляет команду проверочного письма и ранний отказ
14
+ гостю по жёстким правилам, с причинами и совместимостью CSV-импорта.
15
+ Патч 1.4.1 исправляет описание PyPI; код совпадает с 1.4.0.
16
+ Примените миграцию `0019`; см. [изменения и обновление](docs/releases/1.4.0.ru.md).
17
+ При переходе с 1.3.0 и более ранних версий также нужна
18
+ [процедура необратимой миграции 1.3.1](docs/releases/1.3.1.md).
15
19
 
16
20
  [![Tests and distributions](https://github.com/hardcodd/Commentail/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/hardcodd/Commentail/actions/workflows/tests.yml)
17
21
  [![Django Packages · Commentail](https://img.shields.io/badge/Django%20Packages-Commentail-0C4B33.svg)](https://djangopackages.org/packages/p/commentail/)
18
22
 
19
23
  [English](README.md) · Русский
20
24
 
21
- [Начать работу](#быстрый-старт) · [Скриншоты](#скриншоты) · [Документация](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Home.md) · [Wiki](https://github.com/hardcodd/Commentail/wiki) · [Поддержать](#поддержать-commentail)
25
+ [Начать работу](#быстрый-старт) · [Курс](https://hardcodd.net/blog/?series=commentail-tutorials) · [Скриншоты](#скриншоты) · [Документация](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Home-ru.md) · [Wiki](https://github.com/hardcodd/Commentail/wiki/Home-ru) · [Поддержать](#поддержать-commentail)
22
26
 
23
27
  <img src="https://raw.githubusercontent.com/hardcodd/Commentail/main/docs/assets/commentail-preview.png" alt="Commentail — синяя птица на облачке комментария" width="100%">
24
28
 
@@ -149,11 +153,11 @@ CDN и CAPTCHA-сервисов нет. См. [настройку писем](do
149
153
  В виртуальном окружении существующего сайта Wagtail установите опубликованный выпуск:
150
154
 
151
155
  ```sh
152
- python -m pip install commentail==1.3.2
156
+ python -m pip install commentail==1.4.1
153
157
  ```
154
158
 
155
159
  Для необязательного драйвера PostgreSQL используйте
156
- `python -m pip install 'commentail[postgres]==1.3.2'`.
160
+ `python -m pip install 'commentail[postgres]==1.4.1'`.
157
161
  Для существующей установки следуйте [инструкции обновления](docs/wiki/Installation.md#upgrading-and-restoring)
158
162
  до нужной версии.
159
163
 
@@ -200,6 +204,9 @@ python manage.py process_commentail
200
204
  подтверждают email до модерации. При включённой почте авторы с email подписываются
201
205
  на уведомления о прямых ответах; каждое такое письмо содержит отписку для комментария.
202
206
 
207
+ В версии 1.4.0 совпадение с жёстким правилом отклоняет гостевую отправку
208
+ до подтверждения email и сохраняет черновик. См. [правила и CSV](docs/wiki/Rules-and-CSV.md).
209
+
203
210
  Можно настроить почтовый backend Django с доставкой через
204
211
  API и запускать `commentail.background.process_pending()` в очереди проекта
205
212
  вместо отдельной команды по расписанию. Выберите один способ запуска. Принятие
@@ -251,8 +258,12 @@ Django через `OBJECT_ADAPTERS`. Технические настройки
251
258
 
252
259
  ## Документация по задачам
253
260
 
254
- [Wiki](https://github.com/hardcodd/Commentail/wiki) и
255
- [руководства в репозитории](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Home.md)
261
+ [Курс по Commentail из 22 уроков](https://hardcodd.net/blog/?series=commentail-tutorials)
262
+ пошагово разбирает установку, отправку писем, CAPTCHA, оформление и подготовку
263
+ рабочего сайта с примерами кода.
264
+
265
+ [Wiki](https://github.com/hardcodd/Commentail/wiki/Home-ru) и
266
+ [руководства в репозитории](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Home-ru.md)
256
267
  охватывают одни и те же темы. Руководства доступны на английском. Начните с нужной задачи:
257
268
 
258
269
  | Область | Руководства |
@@ -10,16 +10,15 @@ from datetime import timedelta
10
10
 
11
11
  from django.conf import settings
12
12
  from django.contrib.auth.base_user import AbstractBaseUser
13
- from django.core.mail.backends.smtp import EmailBackend
14
13
  from django.db import transaction
15
14
  from django.db.models import F
16
15
  from django.http import HttpRequest
17
16
  from django.utils import timezone
18
- from django.utils.module_loading import import_string
19
17
  from wagtail.models import Site
20
18
 
21
19
  from .antispam import captcha_required, consume_attempt, form_signals, request_signals
22
20
  from .config import technical_settings
21
+ from .email import email_configured
23
22
  from .fingerprints import fingerprint_candidates
24
23
  from .limits import client_ip, consume
25
24
  from .models import Access, Comment, Discussion, FormTicket, Mode, SubmissionRecord
@@ -59,18 +58,6 @@ def can_view(request: HttpRequest, discussion: Discussion) -> bool:
59
58
  )
60
59
 
61
60
 
62
- def email_configured() -> bool:
63
- """Check configuration without constructing or contacting the transport.
64
-
65
- Only SMTP needs an explicit host; other Django backends own their settings.
66
- This is availability for forms, not evidence of successful delivery.
67
- """
68
- backend = import_string(settings.EMAIL_BACKEND)
69
- if issubclass(backend, EmailBackend):
70
- return settings.is_overridden("EMAIL_HOST") and bool(settings.EMAIL_HOST)
71
- return True
72
-
73
-
74
61
  def issue_form(
75
62
  request: HttpRequest,
76
63
  discussion: Discussion,
@@ -0,0 +1,12 @@
1
+ from django.core.checks import Error, register
2
+
3
+ from .config import configuration_errors
4
+ from .email import configuration_errors as email_configuration_errors
5
+
6
+
7
+ @register()
8
+ def check_settings(app_configs: object, **kwargs: object) -> list[Error]:
9
+ return [
10
+ Error(message, id="commentail.E001")
11
+ for message in configuration_errors() + email_configuration_errors()
12
+ ]
@@ -0,0 +1,148 @@
1
+ """Project-wide mail transport configuration, independent of Django's default.
2
+
3
+ Validation and guest-form availability never instantiate a backend. Constructor
4
+ options belong to the selected backend; only SMTP's known options are checked
5
+ here. Credentials and backend exception text must not appear in diagnostics.
6
+ """
7
+
8
+ import math
9
+ from typing import TypedDict
10
+
11
+ from django.conf import settings
12
+ from django.core.exceptions import ImproperlyConfigured
13
+ from django.core.mail import get_connection
14
+ from django.core.mail.backends.base import BaseEmailBackend
15
+ from django.core.mail.backends.smtp import EmailBackend
16
+ from django.utils.module_loading import import_string
17
+
18
+
19
+ class EmailSettings(TypedDict):
20
+ """Resolved transport, constructor options and sender for this process."""
21
+
22
+ BACKEND: str
23
+ OPTIONS: dict[str, object]
24
+ FROM_EMAIL: str
25
+
26
+
27
+ def configuration_errors() -> list[str]:
28
+ """Return redacted configuration errors without constructing a transport."""
29
+ config = getattr(settings, "COMMENTAIL_EMAIL", {})
30
+ if not isinstance(config, dict):
31
+ return ["COMMENTAIL_EMAIL must be a dictionary"]
32
+
33
+ errors: list[str] = []
34
+ if config.keys() - {"BACKEND", "OPTIONS", "FROM_EMAIL"}:
35
+ errors.append("COMMENTAIL_EMAIL accepts only BACKEND, OPTIONS and FROM_EMAIL")
36
+
37
+ backend_path = config.get("BACKEND")
38
+ backend = None
39
+ if backend_path is not None and (
40
+ not isinstance(backend_path, str) or not backend_path.strip()
41
+ ):
42
+ errors.append("COMMENTAIL_EMAIL BACKEND must be a class import path or None")
43
+ else:
44
+ try:
45
+ backend = import_string(backend_path or settings.EMAIL_BACKEND)
46
+ if not isinstance(backend, type) or not issubclass(
47
+ backend, BaseEmailBackend
48
+ ):
49
+ errors.append("COMMENTAIL_EMAIL backend must extend BaseEmailBackend")
50
+ backend = None
51
+ except (ImportError, AttributeError, ValueError):
52
+ errors.append("COMMENTAIL_EMAIL backend cannot be imported")
53
+
54
+ options = config.get("OPTIONS", {})
55
+ if not isinstance(options, dict) or not all(
56
+ isinstance(key, str) for key in options
57
+ ):
58
+ errors.append("COMMENTAIL_EMAIL OPTIONS must be a dictionary with string keys")
59
+ else:
60
+ if {"backend", "fail_silently"} & options.keys():
61
+ errors.append(
62
+ "COMMENTAIL_EMAIL OPTIONS cannot set backend or fail_silently"
63
+ )
64
+ if options and not backend_path:
65
+ errors.append("COMMENTAIL_EMAIL OPTIONS requires an explicit BACKEND")
66
+ if backend is not None and issubclass(backend, EmailBackend):
67
+ errors.extend(_smtp_errors(options))
68
+
69
+ sender = config.get("FROM_EMAIL")
70
+ if sender is not None and (
71
+ not isinstance(sender, str)
72
+ or not sender.strip()
73
+ or any(character in sender for character in ("\r", "\n", "\x00"))
74
+ ):
75
+ errors.append(
76
+ "COMMENTAIL_EMAIL FROM_EMAIL must be a nonempty single-line string or None"
77
+ )
78
+ return errors
79
+
80
+
81
+ def _smtp_errors(options: dict[str, object]) -> list[str]:
82
+ """Check standard SMTP options while allowing subclass-specific keywords."""
83
+ errors: list[str] = []
84
+ for key in ("host", "username", "password", "ssl_keyfile", "ssl_certfile"):
85
+ value = options.get(key)
86
+ if value is not None and not isinstance(value, str):
87
+ errors.append(f"COMMENTAIL_EMAIL SMTP {key} must be a string or None")
88
+ port = options.get("port")
89
+ if port is not None and (type(port) is not int or not 1 <= port <= 65535):
90
+ errors.append("COMMENTAIL_EMAIL SMTP port must be an integer from 1 to 65535")
91
+ for key in ("use_tls", "use_ssl"):
92
+ if options.get(key) is not None and type(options[key]) is not bool:
93
+ errors.append(f"COMMENTAIL_EMAIL SMTP {key} must be a boolean or None")
94
+ tls = options.get("use_tls")
95
+ ssl = options.get("use_ssl")
96
+ if (settings.EMAIL_USE_TLS if tls is None else tls) and (
97
+ settings.EMAIL_USE_SSL if ssl is None else ssl
98
+ ):
99
+ errors.append(
100
+ "COMMENTAIL_EMAIL SMTP use_tls and use_ssl cannot both be enabled"
101
+ )
102
+ timeout = options.get("timeout")
103
+ if timeout is not None and (
104
+ type(timeout) not in (int, float)
105
+ or (type(timeout) is float and not math.isfinite(timeout))
106
+ or timeout <= 0
107
+ ):
108
+ errors.append(
109
+ "COMMENTAIL_EMAIL SMTP timeout must be finite and positive or None"
110
+ )
111
+ return errors
112
+
113
+
114
+ def email_settings() -> EmailSettings:
115
+ """Resolve current settings; invalid independent configuration never falls back."""
116
+ errors = configuration_errors()
117
+ if errors:
118
+ raise ImproperlyConfigured("; ".join(errors))
119
+ config = getattr(settings, "COMMENTAIL_EMAIL", {})
120
+ return {
121
+ "BACKEND": config.get("BACKEND") or settings.EMAIL_BACKEND,
122
+ "OPTIONS": dict(config.get("OPTIONS", {})),
123
+ "FROM_EMAIL": config.get("FROM_EMAIL") or settings.DEFAULT_FROM_EMAIL,
124
+ }
125
+
126
+
127
+ def email_configured() -> bool:
128
+ """Check form availability without I/O; SMTP requires an explicit host."""
129
+ config = email_settings()
130
+ backend = import_string(config["BACKEND"])
131
+ if issubclass(backend, EmailBackend):
132
+ host = config["OPTIONS"].get("host")
133
+ if isinstance(host, str):
134
+ return bool(host.strip())
135
+ return settings.is_overridden("EMAIL_HOST") and bool(settings.EMAIL_HOST)
136
+ return True
137
+
138
+
139
+ def connection() -> BaseEmailBackend:
140
+ """Construct the current backend with failures enabled for queue retry handling."""
141
+ config = email_settings()
142
+ backend = import_string(config["BACKEND"])
143
+ host = config["OPTIONS"].get("host")
144
+ if issubclass(backend, EmailBackend) and isinstance(host, str) and not host.strip():
145
+ # Django treats an empty host kwarg as inheritance. Here it explicitly
146
+ # disables SMTP, including existing jobs, rather than rerouting mail.
147
+ raise ImproperlyConfigured("COMMENTAIL_EMAIL SMTP host is empty")
148
+ return get_connection(config["BACKEND"], fail_silently=False, **config["OPTIONS"])
@@ -90,11 +90,20 @@ class DiscussionSettingsForm(forms.ModelForm):
90
90
  class RuleForm(forms.ModelForm):
91
91
  class Meta:
92
92
  model = ModerationRule
93
- fields = ("phrase", "action", "enabled")
93
+ fields = ("phrase", "action", "enabled", "reason")
94
94
  labels: ClassVar[dict[str, object]] = {
95
95
  "phrase": _("Word or phrase"),
96
96
  "action": _("Action"),
97
97
  "enabled": _("Enabled"),
98
+ "reason": _("Rejection reason"),
99
+ }
100
+ help_texts: ClassVar[dict[str, object]] = {
101
+ "reason": _(
102
+ "Shown to guests when a Reject rule blocks submission before email confirmation. Leave blank for the default message."
103
+ ),
104
+ }
105
+ widgets: ClassVar[dict[str, forms.Widget]] = {
106
+ "reason": forms.Textarea(attrs={"rows": 3}),
98
107
  }
99
108
 
100
109
 
@@ -1063,3 +1063,27 @@ msgstr "Prüfung wiederholen"
1063
1063
 
1064
1064
  msgid "Too many form requests. Please wait and retry the check. Your draft is kept."
1065
1065
  msgstr "Zu viele Formularanfragen. Bitte warten Sie und versuchen Sie die Prüfung erneut. Ihr Entwurf bleibt erhalten."
1066
+
1067
+ msgid "Rejection reason"
1068
+ msgstr "Ablehnungsgrund"
1069
+
1070
+ msgid "Shown to guests when a Reject rule blocks submission before email confirmation. Leave blank for the default message."
1071
+ msgstr "Wird Gästen angezeigt, wenn eine Ablehnungsregel das Absenden vor der E-Mail-Bestätigung verhindert. Für die Standardmeldung leer lassen."
1072
+
1073
+ msgid "Text does not comply with the discussion rules."
1074
+ msgstr "Der Text entspricht nicht den Diskussionsregeln."
1075
+
1076
+ msgid "CSV headers must be phrase, action, enabled, with optional reason."
1077
+ msgstr "Die CSV-Spalten müssen phrase, action, enabled und optional reason heißen."
1078
+
1079
+ msgid "Row %(line)s: expected %(columns)s columns."
1080
+ msgstr "Zeile %(line)s: %(columns)s Spalten erwartet."
1081
+
1082
+ msgid "Row %(line)s: reason must contain at most 2000 characters without null bytes."
1083
+ msgstr "Zeile %(line)s: Der Grund darf höchstens 2000 Zeichen und keine Nullbytes enthalten."
1084
+
1085
+ msgid "The optional reason column sets the guest rejection message (up to 2000 characters). Without this column, existing reasons are preserved; an empty cell clears the reason."
1086
+ msgstr "Die optionale Spalte reason legt die Ablehnungsnachricht für Gäste fest (bis zu 2000 Zeichen). Ohne diese Spalte bleiben vorhandene Gründe erhalten; eine leere Zelle löscht den Grund."
1087
+
1088
+ msgid "The same spreadsheet escaping applies to rejection reasons."
1089
+ msgstr "Dieselbe Maskierung für Tabellenkalkulationen gilt auch für Ablehnungsgründe."
@@ -1063,3 +1063,27 @@ msgstr "Reintentar la verificación"
1063
1063
 
1064
1064
  msgid "Too many form requests. Please wait and retry the check. Your draft is kept."
1065
1065
  msgstr "Demasiadas solicitudes de formulario. Espera y vuelve a intentar la verificación. Tu borrador se conserva."
1066
+
1067
+ msgid "Rejection reason"
1068
+ msgstr "Motivo del rechazo"
1069
+
1070
+ msgid "Shown to guests when a Reject rule blocks submission before email confirmation. Leave blank for the default message."
1071
+ msgstr "Se muestra a los invitados cuando una regla de rechazo bloquea el envío antes de confirmar el correo. Déjelo vacío para usar el mensaje predeterminado."
1072
+
1073
+ msgid "Text does not comply with the discussion rules."
1074
+ msgstr "El texto no cumple las normas de la discusión."
1075
+
1076
+ msgid "CSV headers must be phrase, action, enabled, with optional reason."
1077
+ msgstr "Las cabeceras CSV deben ser phrase, action, enabled y, opcionalmente, reason."
1078
+
1079
+ msgid "Row %(line)s: expected %(columns)s columns."
1080
+ msgstr "Fila %(line)s: se esperaban %(columns)s columnas."
1081
+
1082
+ msgid "Row %(line)s: reason must contain at most 2000 characters without null bytes."
1083
+ msgstr "Fila %(line)s: el motivo debe tener como máximo 2000 caracteres y no contener bytes nulos."
1084
+
1085
+ msgid "The optional reason column sets the guest rejection message (up to 2000 characters). Without this column, existing reasons are preserved; an empty cell clears the reason."
1086
+ msgstr "La columna opcional reason establece el mensaje de rechazo para invitados (hasta 2000 caracteres). Sin esta columna se conservan los motivos existentes; una celda vacía borra el motivo."
1087
+
1088
+ msgid "The same spreadsheet escaping applies to rejection reasons."
1089
+ msgstr "El mismo escape para hojas de cálculo se aplica a los motivos de rechazo."
@@ -1063,3 +1063,27 @@ msgstr "Réessayer la vérification"
1063
1063
 
1064
1064
  msgid "Too many form requests. Please wait and retry the check. Your draft is kept."
1065
1065
  msgstr "Trop de demandes de formulaire. Veuillez patienter et réessayer la vérification. Votre brouillon est conservé."
1066
+
1067
+ msgid "Rejection reason"
1068
+ msgstr "Motif du refus"
1069
+
1070
+ msgid "Shown to guests when a Reject rule blocks submission before email confirmation. Leave blank for the default message."
1071
+ msgstr "Affiché aux visiteurs lorsqu’une règle de refus bloque l’envoi avant la confirmation de l’adresse e-mail. Laisser vide pour le message par défaut."
1072
+
1073
+ msgid "Text does not comply with the discussion rules."
1074
+ msgstr "Le texte ne respecte pas les règles de la discussion."
1075
+
1076
+ msgid "CSV headers must be phrase, action, enabled, with optional reason."
1077
+ msgstr "Les en-têtes CSV doivent être phrase, action, enabled et, éventuellement, reason."
1078
+
1079
+ msgid "Row %(line)s: expected %(columns)s columns."
1080
+ msgstr "Ligne %(line)s : %(columns)s colonnes attendues."
1081
+
1082
+ msgid "Row %(line)s: reason must contain at most 2000 characters without null bytes."
1083
+ msgstr "Ligne %(line)s : le motif doit contenir au plus 2000 caractères, sans octets nuls."
1084
+
1085
+ msgid "The optional reason column sets the guest rejection message (up to 2000 characters). Without this column, existing reasons are preserved; an empty cell clears the reason."
1086
+ msgstr "La colonne facultative reason définit le message de refus pour les visiteurs (2000 caractères maximum). Sans cette colonne, les motifs existants sont conservés ; une cellule vide efface le motif."
1087
+
1088
+ msgid "The same spreadsheet escaping applies to rejection reasons."
1089
+ msgstr "Le même échappement pour les tableurs s’applique aux motifs de refus."
@@ -1063,3 +1063,27 @@ msgstr "Tentar verificação novamente"
1063
1063
 
1064
1064
  msgid "Too many form requests. Please wait and retry the check. Your draft is kept."
1065
1065
  msgstr "Muitas solicitações de formulário. Aguarde e tente a verificação novamente. Seu rascunho foi mantido."
1066
+
1067
+ msgid "Rejection reason"
1068
+ msgstr "Motivo da rejeição"
1069
+
1070
+ msgid "Shown to guests when a Reject rule blocks submission before email confirmation. Leave blank for the default message."
1071
+ msgstr "Exibido aos visitantes quando uma regra de rejeição bloqueia o envio antes da confirmação do e-mail. Deixe em branco para usar a mensagem padrão."
1072
+
1073
+ msgid "Text does not comply with the discussion rules."
1074
+ msgstr "O texto não segue as regras da discussão."
1075
+
1076
+ msgid "CSV headers must be phrase, action, enabled, with optional reason."
1077
+ msgstr "Os cabeçalhos CSV devem ser phrase, action, enabled e, opcionalmente, reason."
1078
+
1079
+ msgid "Row %(line)s: expected %(columns)s columns."
1080
+ msgstr "Linha %(line)s: esperadas %(columns)s colunas."
1081
+
1082
+ msgid "Row %(line)s: reason must contain at most 2000 characters without null bytes."
1083
+ msgstr "Linha %(line)s: o motivo deve conter no máximo 2000 caracteres, sem bytes nulos."
1084
+
1085
+ msgid "The optional reason column sets the guest rejection message (up to 2000 characters). Without this column, existing reasons are preserved; an empty cell clears the reason."
1086
+ msgstr "A coluna opcional reason define a mensagem de rejeição para visitantes (até 2000 caracteres). Sem essa coluna, os motivos existentes são preservados; uma célula vazia apaga o motivo."
1087
+
1088
+ msgid "The same spreadsheet escaping applies to rejection reasons."
1089
+ msgstr "O mesmo escape para planilhas se aplica aos motivos de rejeição."
@@ -1063,3 +1063,27 @@ msgstr "Повторить проверку"
1063
1063
 
1064
1064
  msgid "Too many form requests. Please wait and retry the check. Your draft is kept."
1065
1065
  msgstr "Слишком много запросов формы. Подождите и повторите проверку. Ваш черновик сохранён."
1066
+
1067
+ msgid "Rejection reason"
1068
+ msgstr "Причина отклонения"
1069
+
1070
+ msgid "Shown to guests when a Reject rule blocks submission before email confirmation. Leave blank for the default message."
1071
+ msgstr "Показывается гостю, если правило «Отклонить» блокирует отправку до подтверждения email. Оставьте пустым для стандартного сообщения."
1072
+
1073
+ msgid "Text does not comply with the discussion rules."
1074
+ msgstr "Текст не соответствует правилам обсуждения."
1075
+
1076
+ msgid "CSV headers must be phrase, action, enabled, with optional reason."
1077
+ msgstr "Заголовки CSV: phrase, action, enabled; необязательная колонка — reason."
1078
+
1079
+ msgid "Row %(line)s: expected %(columns)s columns."
1080
+ msgstr "Строка %(line)s: ожидается колонок — %(columns)s."
1081
+
1082
+ msgid "Row %(line)s: reason must contain at most 2000 characters without null bytes."
1083
+ msgstr "Строка %(line)s: причина должна содержать не более 2000 символов без нулевых байтов."
1084
+
1085
+ msgid "The optional reason column sets the guest rejection message (up to 2000 characters). Without this column, existing reasons are preserved; an empty cell clears the reason."
1086
+ msgstr "Необязательная колонка reason задаёт причину отказа для гостя (до 2000 символов). Без этой колонки существующие причины сохраняются; пустая ячейка очищает причину."
1087
+
1088
+ msgid "The same spreadsheet escaping applies to rejection reasons."
1089
+ msgstr "Причины отклонения экранируются для электронных таблиц тем же способом."