commentail 0.1.0__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 (177) hide show
  1. commentail-0.1.0/CHANGELOG.md +15 -0
  2. commentail-0.1.0/LICENSE +21 -0
  3. commentail-0.1.0/MANIFEST.in +9 -0
  4. commentail-0.1.0/PKG-INFO +201 -0
  5. commentail-0.1.0/README.md +175 -0
  6. commentail-0.1.0/commentail/__init__.py +1 -0
  7. commentail-0.1.0/commentail/admin_urls.py +28 -0
  8. commentail-0.1.0/commentail/admin_views.py +660 -0
  9. commentail-0.1.0/commentail/admission.py +201 -0
  10. commentail-0.1.0/commentail/apps.py +19 -0
  11. commentail-0.1.0/commentail/assets.py +21 -0
  12. commentail-0.1.0/commentail/avatars.py +80 -0
  13. commentail-0.1.0/commentail/checks.py +8 -0
  14. commentail-0.1.0/commentail/config.py +193 -0
  15. commentail-0.1.0/commentail/detection.py +89 -0
  16. commentail-0.1.0/commentail/drafts.py +95 -0
  17. commentail-0.1.0/commentail/forms.py +138 -0
  18. commentail-0.1.0/commentail/group_permissions.py +110 -0
  19. commentail-0.1.0/commentail/limits.py +96 -0
  20. commentail-0.1.0/commentail/locale/ru/LC_MESSAGES/django.mo +0 -0
  21. commentail-0.1.0/commentail/locale/ru/LC_MESSAGES/django.po +825 -0
  22. commentail-0.1.0/commentail/logging.py +24 -0
  23. commentail-0.1.0/commentail/management/__init__.py +0 -0
  24. commentail-0.1.0/commentail/management/commands/__init__.py +0 -0
  25. commentail-0.1.0/commentail/management/commands/process_commentail.py +24 -0
  26. commentail-0.1.0/commentail/middleware.py +27 -0
  27. commentail-0.1.0/commentail/migrations/0001_initial.py +408 -0
  28. commentail-0.1.0/commentail/migrations/0002_sitegrouppermission_hide_sitegrouppermission_view.py +24 -0
  29. commentail-0.1.0/commentail/migrations/0003_actiontoken_captchachallenge_guestgrant.py +104 -0
  30. commentail-0.1.0/commentail/migrations/0004_submissionrecord.py +55 -0
  31. commentail-0.1.0/commentail/migrations/0005_rateevent.py +48 -0
  32. commentail-0.1.0/commentail/migrations/0006_alter_comment_guest_name_and_more.py +24 -0
  33. commentail-0.1.0/commentail/migrations/0007_actiontoken_nonce_replysubscription_mailjob.py +108 -0
  34. commentail-0.1.0/commentail/migrations/0008_mailjob_revision.py +25 -0
  35. commentail-0.1.0/commentail/migrations/0009_formticket.py +39 -0
  36. commentail-0.1.0/commentail/migrations/0010_captchachallenge_backend_and_more.py +25 -0
  37. commentail-0.1.0/commentail/migrations/0011_discussion_content_type_discussion_object_id_and_more.py +68 -0
  38. commentail-0.1.0/commentail/migrations/0012_formticket_draft.py +21 -0
  39. commentail-0.1.0/commentail/migrations/0013_sitecommentsettings_email_enabled.py +21 -0
  40. commentail-0.1.0/commentail/migrations/__init__.py +0 -0
  41. commentail-0.1.0/commentail/models.py +344 -0
  42. commentail-0.1.0/commentail/objects.py +266 -0
  43. commentail-0.1.0/commentail/outbox.py +526 -0
  44. commentail-0.1.0/commentail/page_integration.py +137 -0
  45. commentail-0.1.0/commentail/panels.py +15 -0
  46. commentail-0.1.0/commentail/permissions.py +31 -0
  47. commentail-0.1.0/commentail/policies.py +80 -0
  48. commentail-0.1.0/commentail/public.py +719 -0
  49. commentail-0.1.0/commentail/rules_csv.py +164 -0
  50. commentail-0.1.0/commentail/security.py +290 -0
  51. commentail-0.1.0/commentail/services.py +487 -0
  52. commentail-0.1.0/commentail/signals.py +27 -0
  53. commentail-0.1.0/commentail/static/commentail/admin.css +62 -0
  54. commentail-0.1.0/commentail/static/commentail/admin.js +27 -0
  55. commentail-0.1.0/commentail/static/commentail/commentail.css +198 -0
  56. commentail-0.1.0/commentail/static/commentail/commentail.js +322 -0
  57. commentail-0.1.0/commentail/structured.py +95 -0
  58. commentail-0.1.0/commentail/templates/commentail/action.html +23 -0
  59. commentail-0.1.0/commentail/templates/commentail/admin/detail.html +5 -0
  60. commentail-0.1.0/commentail/templates/commentail/admin/form.html +13 -0
  61. commentail-0.1.0/commentail/templates/commentail/admin/group_permission_row.html +4 -0
  62. commentail-0.1.0/commentail/templates/commentail/admin/group_permissions.html +13 -0
  63. commentail-0.1.0/commentail/templates/commentail/admin/list.html +9 -0
  64. commentail-0.1.0/commentail/templates/commentail/admin/mail.html +9 -0
  65. commentail-0.1.0/commentail/templates/commentail/admin/objects.html +8 -0
  66. commentail-0.1.0/commentail/templates/commentail/admin/page_panel.html +1 -0
  67. commentail-0.1.0/commentail/templates/commentail/admin/rules.html +25 -0
  68. commentail-0.1.0/commentail/templates/commentail/admin/rules_import.html +24 -0
  69. commentail-0.1.0/commentail/templates/commentail/base.html +23 -0
  70. commentail-0.1.0/commentail/templates/commentail/block.html +1 -0
  71. commentail-0.1.0/commentail/templates/commentail/captcha.html +1 -0
  72. commentail-0.1.0/commentail/templates/commentail/comment.html +1 -0
  73. commentail-0.1.0/commentail/templates/commentail/edit-form.html +13 -0
  74. commentail-0.1.0/commentail/templates/commentail/emails/confirm.txt +7 -0
  75. commentail-0.1.0/commentail/templates/commentail/emails/confirm_subject.txt +1 -0
  76. commentail-0.1.0/commentail/templates/commentail/emails/edit.txt +5 -0
  77. commentail-0.1.0/commentail/templates/commentail/emails/edit_subject.txt +1 -0
  78. commentail-0.1.0/commentail/templates/commentail/emails/published.txt +3 -0
  79. commentail-0.1.0/commentail/templates/commentail/emails/published_subject.txt +1 -0
  80. commentail-0.1.0/commentail/templates/commentail/emails/rejected.txt +5 -0
  81. commentail-0.1.0/commentail/templates/commentail/emails/rejected_subject.txt +1 -0
  82. commentail-0.1.0/commentail/templates/commentail/emails/reply.txt +6 -0
  83. commentail-0.1.0/commentail/templates/commentail/emails/reply_subject.txt +1 -0
  84. commentail-0.1.0/commentail/templates/commentail/form.html +1 -0
  85. commentail-0.1.0/commentail/templates/commentail/replies.html +1 -0
  86. commentail-0.1.0/commentail/templatetags/__init__.py +0 -0
  87. commentail-0.1.0/commentail/templatetags/commentail_tags.py +80 -0
  88. commentail-0.1.0/commentail/text.py +7 -0
  89. commentail-0.1.0/commentail/urls.py +15 -0
  90. commentail-0.1.0/commentail/views.py +159 -0
  91. commentail-0.1.0/commentail/wagtail_hooks.py +44 -0
  92. commentail-0.1.0/commentail.egg-info/PKG-INFO +201 -0
  93. commentail-0.1.0/commentail.egg-info/SOURCES.txt +175 -0
  94. commentail-0.1.0/commentail.egg-info/dependency_links.txt +1 -0
  95. commentail-0.1.0/commentail.egg-info/requires.txt +6 -0
  96. commentail-0.1.0/commentail.egg-info/top_level.txt +1 -0
  97. commentail-0.1.0/docs/assets/commentail-preview.png +0 -0
  98. commentail-0.1.0/docs/assets/support-qr.png +0 -0
  99. commentail-0.1.0/docs/releases/0.1.0.md +49 -0
  100. commentail-0.1.0/docs/wiki/Callbacks.md +79 -0
  101. commentail-0.1.0/docs/wiki/Configuration.md +89 -0
  102. commentail-0.1.0/docs/wiki/Deployment.md +38 -0
  103. commentail-0.1.0/docs/wiki/Email-and-worker.md +77 -0
  104. commentail-0.1.0/docs/wiki/Example-and-testing.md +68 -0
  105. commentail-0.1.0/docs/wiki/Guest-comments.md +44 -0
  106. commentail-0.1.0/docs/wiki/Home.md +46 -0
  107. commentail-0.1.0/docs/wiki/Installation.md +87 -0
  108. commentail-0.1.0/docs/wiki/Moderation.md +51 -0
  109. commentail-0.1.0/docs/wiki/Object-adapters.md +67 -0
  110. commentail-0.1.0/docs/wiki/Release-0.1.0.md +38 -0
  111. commentail-0.1.0/docs/wiki/Replies-and-editing.md +43 -0
  112. commentail-0.1.0/docs/wiki/Rules-and-CSV.md +50 -0
  113. commentail-0.1.0/docs/wiki/Security-and-privacy.md +58 -0
  114. commentail-0.1.0/docs/wiki/Structured-data.md +79 -0
  115. commentail-0.1.0/docs/wiki/Styling.md +67 -0
  116. commentail-0.1.0/docs/wiki/Support.md +16 -0
  117. commentail-0.1.0/docs/wiki/Templates.md +79 -0
  118. commentail-0.1.0/docs/wiki/Troubleshooting.md +50 -0
  119. commentail-0.1.0/docs/wiki/_Footer.md +1 -0
  120. commentail-0.1.0/docs/wiki/_Sidebar.md +21 -0
  121. commentail-0.1.0/example/README.md +41 -0
  122. commentail-0.1.0/example/demo/__init__.py +0 -0
  123. commentail-0.1.0/example/demo/settings.py +88 -0
  124. commentail-0.1.0/example/demo/urls.py +10 -0
  125. commentail-0.1.0/example/demo_home/__init__.py +0 -0
  126. commentail-0.1.0/example/demo_home/comments.py +18 -0
  127. commentail-0.1.0/example/demo_home/management/__init__.py +0 -0
  128. commentail-0.1.0/example/demo_home/management/commands/__init__.py +0 -0
  129. commentail-0.1.0/example/demo_home/management/commands/bootstrap_demo.py +37 -0
  130. commentail-0.1.0/example/demo_home/migrations/0001_initial.py +45 -0
  131. commentail-0.1.0/example/demo_home/migrations/0002_product.py +39 -0
  132. commentail-0.1.0/example/demo_home/migrations/__init__.py +0 -0
  133. commentail-0.1.0/example/demo_home/models.py +28 -0
  134. commentail-0.1.0/example/demo_home/templates/demo_home/home_page.html +3 -0
  135. commentail-0.1.0/example/demo_home/templates/demo_home/product.html +1 -0
  136. commentail-0.1.0/example/demo_home/views.py +13 -0
  137. commentail-0.1.0/example/manage.py +10 -0
  138. commentail-0.1.0/pyproject.toml +40 -0
  139. commentail-0.1.0/requirements-test.txt +35 -0
  140. commentail-0.1.0/setup.cfg +4 -0
  141. commentail-0.1.0/tests/__init__.py +0 -0
  142. commentail-0.1.0/tests/settings.py +71 -0
  143. commentail-0.1.0/tests/targets/__init__.py +0 -0
  144. commentail-0.1.0/tests/targets/apps.py +6 -0
  145. commentail-0.1.0/tests/targets/migrations/0001_initial.py +80 -0
  146. commentail-0.1.0/tests/targets/migrations/__init__.py +0 -0
  147. commentail-0.1.0/tests/targets/models.py +26 -0
  148. commentail-0.1.0/tests/templates/wagtailcore/page.html +1 -0
  149. commentail-0.1.0/tests/test_actions.py +196 -0
  150. commentail-0.1.0/tests/test_admin.js +35 -0
  151. commentail-0.1.0/tests/test_admin_ui.py +246 -0
  152. commentail-0.1.0/tests/test_admission.py +160 -0
  153. commentail-0.1.0/tests/test_avatars.py +68 -0
  154. commentail-0.1.0/tests/test_captcha_backend.py +147 -0
  155. commentail-0.1.0/tests/test_cleanup.py +30 -0
  156. commentail-0.1.0/tests/test_concurrency.py +107 -0
  157. commentail-0.1.0/tests/test_detection.py +84 -0
  158. commentail-0.1.0/tests/test_group_panel.py +118 -0
  159. commentail-0.1.0/tests/test_inline_edit.py +124 -0
  160. commentail-0.1.0/tests/test_lifecycle.py +368 -0
  161. commentail-0.1.0/tests/test_mail_admin.py +131 -0
  162. commentail-0.1.0/tests/test_notifications.py +106 -0
  163. commentail-0.1.0/tests/test_object_adapters.py +403 -0
  164. commentail-0.1.0/tests/test_outbox.py +220 -0
  165. commentail-0.1.0/tests/test_progressive.js +366 -0
  166. commentail-0.1.0/tests/test_public_ui.py +726 -0
  167. commentail-0.1.0/tests/test_rate_limits.py +78 -0
  168. commentail-0.1.0/tests/test_release_gaps.py +405 -0
  169. commentail-0.1.0/tests/test_reply.js +61 -0
  170. commentail-0.1.0/tests/test_rules_admin.py +110 -0
  171. commentail-0.1.0/tests/test_rules_csv.py +177 -0
  172. commentail-0.1.0/tests/test_security.py +166 -0
  173. commentail-0.1.0/tests/test_smtp_chain.py +191 -0
  174. commentail-0.1.0/tests/test_structured_data.py +270 -0
  175. commentail-0.1.0/tests/test_submission.py +46 -0
  176. commentail-0.1.0/tests/urls.py +8 -0
  177. commentail-0.1.0/tools/check_dist.py +89 -0
@@ -0,0 +1,15 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0
4
+
5
+ Initial Commentail release candidate for Wagtail 7.4 LTS.
6
+
7
+ - Template-based Page integration and adapters for ordinary Django models.
8
+ - Site/Page configuration, moderation queue, group permissions and CSV rules.
9
+ - Verified guests, replaceable CAPTCHA and Site-scoped rate limits.
10
+ - Threaded replies, inline author revisions and protected guest actions.
11
+ - Database email outbox, direct-reply notifications and unsubscribe.
12
+ - Schema.org Comment microdata and JSON-LD, with per-site output selection.
13
+ - Theme inheritance, template overrides, Python hooks and English/Russian UI.
14
+
15
+ See [release notes](docs/releases/0.1.0.md) and [setup guides](docs/wiki/Home.md).
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Commentail contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,9 @@
1
+ recursive-include tests *.py *.html *.js
2
+ recursive-include example *.py *.html *.md
3
+ include requirements-test.txt
4
+ recursive-include tools *.py
5
+ include CHANGELOG.md
6
+ recursive-include docs/wiki *.md
7
+ recursive-include docs/releases *.md
8
+ include docs/assets/commentail-preview.png
9
+ include docs/assets/support-qr.png
@@ -0,0 +1,201 @@
1
+ Metadata-Version: 2.4
2
+ Name: commentail
3
+ Version: 0.1.0
4
+ Summary: Self-hosted Wagtail comments with moderation, verified guests and threaded replies
5
+ License-Expression: MIT
6
+ Project-URL: Source, https://github.com/hardcodd/Commentail
7
+ Project-URL: Issues, https://github.com/hardcodd/Commentail/issues
8
+ Project-URL: Documentation, https://github.com/hardcodd/Commentail/wiki
9
+ Project-URL: Changelog, https://github.com/hardcodd/Commentail/blob/main/CHANGELOG.md
10
+ Project-URL: Funding, https://pay.cloudtips.ru/p/f92ee349
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Framework :: Django :: 5.2
13
+ Classifier: Framework :: Wagtail
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Requires-Python: >=3.12
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: Django<5.3,>=5.2
21
+ Requires-Dist: Wagtail<7.5,>=7.4.3
22
+ Requires-Dist: regex>=2026.9.29
23
+ Provides-Extra: postgres
24
+ Requires-Dist: psycopg[binary]>=3.3.6; extra == "postgres"
25
+ Dynamic: license-file
26
+
27
+ <div align="center">
28
+
29
+ # Commentail
30
+
31
+ **Self-hosted comments for Wagtail CMS**
32
+
33
+ Moderated discussions, verified guests and inline replies — styled by your site.
34
+
35
+ [![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)
36
+
37
+ [Get started](#quick-start) · [Documentation](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Home.md) · [Wiki](https://github.com/hardcodd/Commentail/wiki) · [Support](#support-commentail)
38
+
39
+ <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%">
40
+
41
+ </div>
42
+
43
+ Commentail is a Django comments library built for **Wagtail 7.4 LTS**. Add a
44
+ Django template tag to an article, moderate discussions inside Wagtail, and keep
45
+ content, accounts and email delivery in your own application.
46
+
47
+ The widget inherits your site's typography and colors. CSS custom properties,
48
+ replaceable templates and Python callbacks let you adapt it without a frontend
49
+ framework or an external comments platform.
50
+
51
+ > Wagtail 8.0 is not supported by 0.1.0.
52
+
53
+ ## Why Commentail?
54
+
55
+ | For readers | For editors | For developers |
56
+ | --- | --- | --- |
57
+ | Guest email verification or existing site accounts | Four moderation policies | One template tag for Pages and registered objects |
58
+ | Inline replies and author editing | Site defaults and Page overrides | CSS properties and template overrides |
59
+ | Direct-reply email with unsubscribe | Word/phrase rules and CSV import/export | Replaceable avatars, names and CAPTCHA |
60
+ | Responsive layout and plain HTML fallbacks | Site-scoped group permissions | Database outbox; no Redis/Celery requirement |
61
+
62
+ Comments are plain text with an adjustable 5000-character default. Optional
63
+ clickable HTTP(S) links use safe attributes. Replies can address any visible
64
+ message while keeping one visual nesting level. Moderators approve, reject,
65
+ hide, restore or erase text; they never rewrite another author's words.
66
+
67
+ Published comments include **Schema.org Comment microdata and JSON-LD**, using
68
+ the visible text and author name. Choose either format or disable output in Python.
69
+ [Structured-data guide →](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Structured-data.md)
70
+
71
+ ## Compatibility
72
+
73
+ | Component | Version / requirement |
74
+ | --- | --- |
75
+ | Python | 3.12–3.14 |
76
+ | Wagtail | >=7.4.3, <7.5 |
77
+ | Django | >=5.2, <5.3 |
78
+ | Database | SQLite or PostgreSQL; CI covers PostgreSQL 14 |
79
+ | UI languages | English and Russian |
80
+ | Frontend | Django templates, optional progressive JavaScript |
81
+ | License | [MIT](https://github.com/hardcodd/Commentail/blob/main/LICENSE) |
82
+
83
+ Guest comments require configured SMTP and the scheduled worker. Registered
84
+ users can comment without an email address, but receive no mail. Your site
85
+ provides login and registration. No required external CDN or CAPTCHA service.
86
+
87
+ ## Quick start
88
+
89
+ ### 1. Install
90
+
91
+ In your site's virtual environment, install the release:
92
+
93
+ ```sh
94
+ python -m pip install commentail==0.1.0
95
+ ```
96
+
97
+ For the optional PostgreSQL driver, use `python -m pip install 'commentail[postgres]==0.1.0'`.
98
+ You can also install a downloaded wheel directly, or extract the source distribution
99
+ and run `python -m pip install .` in its root.
100
+
101
+ ### 2. Connect Django and Wagtail
102
+
103
+ - Add `commentail` and `wagtail.contrib.settings` to your existing `INSTALLED_APPS`.
104
+ - Insert `commentail.middleware.CapabilityHeadersMiddleware` before CSRF middleware.
105
+ - Retain the host session/authentication/messages middleware and template request context processor.
106
+ - Include Commentail URLs **before** Wagtail's catch-all:
107
+
108
+ ```python
109
+ path("commentail/", include("commentail.urls")),
110
+ ```
111
+
112
+ Run `python manage.py migrate`, `python manage.py check` and your normal static
113
+ collection. See the [complete installation guide](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Installation.md)
114
+ for settings, URL imports, CSRF draft recovery and deployment details.
115
+
116
+ ### 3. Add the widget
117
+
118
+ ```django
119
+ {% load commentail_tags %}
120
+ {% commentail_css %}
121
+ {% commentail_js %}
122
+ {% commentail page %}
123
+ ```
124
+
125
+ Put the resource tags once in the base template and the widget in the article.
126
+ The template controls where Page comments are available; the corresponding Page
127
+ editor receives a Comments tab. Configure site defaults, then inherit or override
128
+ on individual Pages. **Review all** is the initial moderation policy.
129
+
130
+ ### 4. Enable email and cleanup
131
+
132
+ Configure Django's SMTP settings and schedule this once per minute:
133
+
134
+ ```sh
135
+ python manage.py process_commentail
136
+ ```
137
+
138
+ It sends the database outbox and removes expired transient records. Guests confirm
139
+ email before moderation. Public submissions with an email are automatically
140
+ subscribed to direct-reply notifications when mail is enabled; each reply email
141
+ includes per-comment unsubscribe. [Email setup and behavior →](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Email-and-worker.md)
142
+
143
+ ## Make it yours
144
+
145
+ The widget has a transparent surface and inherits the container's font and text
146
+ color, following your site's light/dark theme. Load overrides after its stylesheet:
147
+
148
+ ```css
149
+ .commentail {
150
+ --commentail-color-accent: var(--brand-link, #245a86);
151
+ --commentail-border-radius: .5rem;
152
+ --commentail-max-width: 100%;
153
+ }
154
+ ```
155
+
156
+ Use `GET_AVATAR` to return a profile image URL, or return `None` for generated
157
+ initials. Register ordinary Django models through `OBJECT_ADAPTERS`. Technical
158
+ settings use a single `COMMENTAIL` dictionary with `default` and hostname overrides.
159
+
160
+ ## Documentation by task
161
+
162
+ The [Wiki](https://github.com/hardcodd/Commentail/wiki) and the [versioned guides](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Home.md)
163
+ cover the same topics. Start with the task you need:
164
+
165
+ | Area | Guides |
166
+ | --- | --- |
167
+ | Connect | [Installation](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Installation.md) · [Runnable example](https://github.com/hardcodd/Commentail/blob/main/example/README.md) |
168
+ | Configure | [Site, Page and Python settings](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Configuration.md) · [Moderation](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Moderation.md) · [CSV rules](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Rules-and-CSV.md) |
169
+ | Reader behavior | [Guests](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Guest-comments.md) · [Replies and editing](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Replies-and-editing.md) |
170
+ | Customize | [CSS and themes](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Styling.md) · [Templates and email](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Templates.md) · [Python callbacks](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Callbacks.md) · [Django model adapters](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Object-adapters.md) |
171
+ | Operate | [SMTP and worker](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Email-and-worker.md) · [Deployment](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Deployment.md) · [Security and privacy](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Security-and-privacy.md) |
172
+ | Diagnose | [Troubleshooting / FAQ](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Troubleshooting.md) · [Example and testing](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Example-and-testing.md) |
173
+
174
+ ## Release scope and verification
175
+
176
+ [0.1.0 release notes](https://github.com/hardcodd/Commentail/blob/main/docs/releases/0.1.0.md) describe the initial feature set and
177
+ limits. The source distribution includes the runnable Wagtail example, tests and
178
+ guides; the wheel includes the runtime, translations, templates and static assets.
179
+
180
+ CI checks six Python/database combinations, JavaScript, lint, migration drift,
181
+ translations and source/wheel installation. Browser checks covered installed Safari,
182
+ Chrome, Yandex Browser and Firefox with and without JS, plus selected VoiceOver
183
+ scenarios and a phone. Previous major browser versions remain unverified; this is
184
+ not an exhaustive accessibility or device certification.
185
+
186
+ There is no separate REST API, rich-text editor, uploads, likes, reports or live
187
+ updates in 0.1.0. SMTP retries can duplicate mail after an uncertain delivery result.
188
+ Host-specific themes, access rules and email delivery need their own acceptance checks.
189
+
190
+ ## Support Commentail
191
+
192
+ If Commentail helps your project, you can support maintenance, documentation and
193
+ compatibility work. Contributions are optional.
194
+
195
+ **[Support via CloudTips](https://pay.cloudtips.ru/p/f92ee349)**
196
+
197
+ <a href="https://pay.cloudtips.ru/p/f92ee349"><img src="https://raw.githubusercontent.com/hardcodd/Commentail/main/docs/assets/support-qr.png" alt="Scan to support Commentail via CloudTips" width="180"></a>
198
+
199
+ For questions and reproducible bugs, check the [FAQ](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Troubleshooting.md)
200
+ then open a [GitHub issue](https://github.com/hardcodd/Commentail/issues). Do not
201
+ include credentials, private comments or protected email links.
@@ -0,0 +1,175 @@
1
+ <div align="center">
2
+
3
+ # Commentail
4
+
5
+ **Self-hosted comments for Wagtail CMS**
6
+
7
+ Moderated discussions, verified guests and inline replies — styled by your site.
8
+
9
+ [![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)
10
+
11
+ [Get started](#quick-start) · [Documentation](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Home.md) · [Wiki](https://github.com/hardcodd/Commentail/wiki) · [Support](#support-commentail)
12
+
13
+ <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%">
14
+
15
+ </div>
16
+
17
+ Commentail is a Django comments library built for **Wagtail 7.4 LTS**. Add a
18
+ Django template tag to an article, moderate discussions inside Wagtail, and keep
19
+ content, accounts and email delivery in your own application.
20
+
21
+ The widget inherits your site's typography and colors. CSS custom properties,
22
+ replaceable templates and Python callbacks let you adapt it without a frontend
23
+ framework or an external comments platform.
24
+
25
+ > Wagtail 8.0 is not supported by 0.1.0.
26
+
27
+ ## Why Commentail?
28
+
29
+ | For readers | For editors | For developers |
30
+ | --- | --- | --- |
31
+ | Guest email verification or existing site accounts | Four moderation policies | One template tag for Pages and registered objects |
32
+ | Inline replies and author editing | Site defaults and Page overrides | CSS properties and template overrides |
33
+ | Direct-reply email with unsubscribe | Word/phrase rules and CSV import/export | Replaceable avatars, names and CAPTCHA |
34
+ | Responsive layout and plain HTML fallbacks | Site-scoped group permissions | Database outbox; no Redis/Celery requirement |
35
+
36
+ Comments are plain text with an adjustable 5000-character default. Optional
37
+ clickable HTTP(S) links use safe attributes. Replies can address any visible
38
+ message while keeping one visual nesting level. Moderators approve, reject,
39
+ hide, restore or erase text; they never rewrite another author's words.
40
+
41
+ Published comments include **Schema.org Comment microdata and JSON-LD**, using
42
+ the visible text and author name. Choose either format or disable output in Python.
43
+ [Structured-data guide →](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Structured-data.md)
44
+
45
+ ## Compatibility
46
+
47
+ | Component | Version / requirement |
48
+ | --- | --- |
49
+ | Python | 3.12–3.14 |
50
+ | Wagtail | >=7.4.3, <7.5 |
51
+ | Django | >=5.2, <5.3 |
52
+ | Database | SQLite or PostgreSQL; CI covers PostgreSQL 14 |
53
+ | UI languages | English and Russian |
54
+ | Frontend | Django templates, optional progressive JavaScript |
55
+ | License | [MIT](https://github.com/hardcodd/Commentail/blob/main/LICENSE) |
56
+
57
+ Guest comments require configured SMTP and the scheduled worker. Registered
58
+ users can comment without an email address, but receive no mail. Your site
59
+ provides login and registration. No required external CDN or CAPTCHA service.
60
+
61
+ ## Quick start
62
+
63
+ ### 1. Install
64
+
65
+ In your site's virtual environment, install the release:
66
+
67
+ ```sh
68
+ python -m pip install commentail==0.1.0
69
+ ```
70
+
71
+ For the optional PostgreSQL driver, use `python -m pip install 'commentail[postgres]==0.1.0'`.
72
+ You can also install a downloaded wheel directly, or extract the source distribution
73
+ and run `python -m pip install .` in its root.
74
+
75
+ ### 2. Connect Django and Wagtail
76
+
77
+ - Add `commentail` and `wagtail.contrib.settings` to your existing `INSTALLED_APPS`.
78
+ - Insert `commentail.middleware.CapabilityHeadersMiddleware` before CSRF middleware.
79
+ - Retain the host session/authentication/messages middleware and template request context processor.
80
+ - Include Commentail URLs **before** Wagtail's catch-all:
81
+
82
+ ```python
83
+ path("commentail/", include("commentail.urls")),
84
+ ```
85
+
86
+ Run `python manage.py migrate`, `python manage.py check` and your normal static
87
+ collection. See the [complete installation guide](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Installation.md)
88
+ for settings, URL imports, CSRF draft recovery and deployment details.
89
+
90
+ ### 3. Add the widget
91
+
92
+ ```django
93
+ {% load commentail_tags %}
94
+ {% commentail_css %}
95
+ {% commentail_js %}
96
+ {% commentail page %}
97
+ ```
98
+
99
+ Put the resource tags once in the base template and the widget in the article.
100
+ The template controls where Page comments are available; the corresponding Page
101
+ editor receives a Comments tab. Configure site defaults, then inherit or override
102
+ on individual Pages. **Review all** is the initial moderation policy.
103
+
104
+ ### 4. Enable email and cleanup
105
+
106
+ Configure Django's SMTP settings and schedule this once per minute:
107
+
108
+ ```sh
109
+ python manage.py process_commentail
110
+ ```
111
+
112
+ It sends the database outbox and removes expired transient records. Guests confirm
113
+ email before moderation. Public submissions with an email are automatically
114
+ subscribed to direct-reply notifications when mail is enabled; each reply email
115
+ includes per-comment unsubscribe. [Email setup and behavior →](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Email-and-worker.md)
116
+
117
+ ## Make it yours
118
+
119
+ The widget has a transparent surface and inherits the container's font and text
120
+ color, following your site's light/dark theme. Load overrides after its stylesheet:
121
+
122
+ ```css
123
+ .commentail {
124
+ --commentail-color-accent: var(--brand-link, #245a86);
125
+ --commentail-border-radius: .5rem;
126
+ --commentail-max-width: 100%;
127
+ }
128
+ ```
129
+
130
+ Use `GET_AVATAR` to return a profile image URL, or return `None` for generated
131
+ initials. Register ordinary Django models through `OBJECT_ADAPTERS`. Technical
132
+ settings use a single `COMMENTAIL` dictionary with `default` and hostname overrides.
133
+
134
+ ## Documentation by task
135
+
136
+ The [Wiki](https://github.com/hardcodd/Commentail/wiki) and the [versioned guides](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Home.md)
137
+ cover the same topics. Start with the task you need:
138
+
139
+ | Area | Guides |
140
+ | --- | --- |
141
+ | Connect | [Installation](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Installation.md) · [Runnable example](https://github.com/hardcodd/Commentail/blob/main/example/README.md) |
142
+ | Configure | [Site, Page and Python settings](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Configuration.md) · [Moderation](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Moderation.md) · [CSV rules](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Rules-and-CSV.md) |
143
+ | Reader behavior | [Guests](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Guest-comments.md) · [Replies and editing](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Replies-and-editing.md) |
144
+ | Customize | [CSS and themes](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Styling.md) · [Templates and email](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Templates.md) · [Python callbacks](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Callbacks.md) · [Django model adapters](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Object-adapters.md) |
145
+ | Operate | [SMTP and worker](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Email-and-worker.md) · [Deployment](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Deployment.md) · [Security and privacy](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Security-and-privacy.md) |
146
+ | Diagnose | [Troubleshooting / FAQ](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Troubleshooting.md) · [Example and testing](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Example-and-testing.md) |
147
+
148
+ ## Release scope and verification
149
+
150
+ [0.1.0 release notes](https://github.com/hardcodd/Commentail/blob/main/docs/releases/0.1.0.md) describe the initial feature set and
151
+ limits. The source distribution includes the runnable Wagtail example, tests and
152
+ guides; the wheel includes the runtime, translations, templates and static assets.
153
+
154
+ CI checks six Python/database combinations, JavaScript, lint, migration drift,
155
+ translations and source/wheel installation. Browser checks covered installed Safari,
156
+ Chrome, Yandex Browser and Firefox with and without JS, plus selected VoiceOver
157
+ scenarios and a phone. Previous major browser versions remain unverified; this is
158
+ not an exhaustive accessibility or device certification.
159
+
160
+ There is no separate REST API, rich-text editor, uploads, likes, reports or live
161
+ updates in 0.1.0. SMTP retries can duplicate mail after an uncertain delivery result.
162
+ Host-specific themes, access rules and email delivery need their own acceptance checks.
163
+
164
+ ## Support Commentail
165
+
166
+ If Commentail helps your project, you can support maintenance, documentation and
167
+ compatibility work. Contributions are optional.
168
+
169
+ **[Support via CloudTips](https://pay.cloudtips.ru/p/f92ee349)**
170
+
171
+ <a href="https://pay.cloudtips.ru/p/f92ee349"><img src="https://raw.githubusercontent.com/hardcodd/Commentail/main/docs/assets/support-qr.png" alt="Scan to support Commentail via CloudTips" width="180"></a>
172
+
173
+ For questions and reproducible bugs, check the [FAQ](https://github.com/hardcodd/Commentail/blob/main/docs/wiki/Troubleshooting.md)
174
+ then open a [GitHub issue](https://github.com/hardcodd/Commentail/issues). Do not
175
+ include credentials, private comments or protected email links.
@@ -0,0 +1 @@
1
+ """Commentail: a Wagtail comments application under active development."""
@@ -0,0 +1,28 @@
1
+ from django.urls import path
2
+
3
+ from . import admin_views as views
4
+
5
+ app_name = "commentail_admin"
6
+ urlpatterns = [
7
+ path("objects/", views.objects_list, name="objects"),
8
+ path("objects/<int:identifier>/", views.object_settings, name="object_settings"),
9
+ path("", views.index, name="list"),
10
+ path("bulk/", views.bulk, name="bulk"),
11
+ path("rules/", views.rules, name="rules"),
12
+ path("rules/import/", views.rules_import, name="rules_import"),
13
+ path("rules/export/", views.rules_export, name="rules_export"),
14
+ path("rules/add/", views.rule_edit, name="rule_add"),
15
+ path("rules/<int:identifier>/", views.rule_edit, name="rule_edit"),
16
+ path("access/", views.access, name="access"),
17
+ path("settings/<int:site_id>/", views.settings_view, name="settings"),
18
+ path(
19
+ "settings/<int:site_id>/<int:page_id>/",
20
+ views.settings_view,
21
+ name="page_settings",
22
+ ),
23
+ path("mail/", views.mail_queue, name="mail"),
24
+ path("mail/<int:identifier>/retry/", views.retry_mail, name="retry"),
25
+ path("<int:identifier>/", views.detail, name="detail"),
26
+ path("<int:identifier>/action/", views.action, name="action"),
27
+ path("<int:identifier>/revision/", views.revision_action, name="revision"),
28
+ ]