Lesson 1 / 22 · Commentail 1.3.2
Start with the practice site on your own computer. You can learn how comments, moderation and guest confirmation fit together before changing a live Wagtail installation.
Prepare your computer
A terminal runs text commands. Use PowerShell on Windows or Terminal on macOS. Run commands one at a time; resolve an error before continuing. The language label above a code block is not part of the command.
This course targets Commentail 1.3.2. Supported versions are Python 3.12–3.14, file SQLite or PostgreSQL 16; Wagtail 7.4.3+ within 7.4 with Django 5.2 or 6.0; Wagtail 8.0 with Django 5.2, 6.0 or 6.1. We will use Python 3.12 and SQLite. Install Python from python.org without replacing your operating system's Python.
Download the source .tar.gz archive from the release files and extract it. Open a terminal in the folder containing pyproject.toml and example. The source archive includes the practice site; an installed wheel does not provide that directory. On macOS/Linux run:
python3.12 -m venv .venv
source .venv/bin/activate
python --version
python -m pip install commentail==1.3.2
On Windows use:
py -3.12 -m venv .venv
.\.venv\Scripts\Activate.ps1
python --version
python -m pip install commentail==1.3.2
A virtual environment is a separate directory of project libraries. Activate it again in each new terminal. If PowerShell blocks activation, leave the system security policy alone and run .venv\Scripts\python.exe instead of python. From inside example, use ..\.venv\Scripts\python.exe.
Run the example
From the extracted archive root run:
python -m pip install -e .
cd example
python manage.py migrate
python manage.py bootstrap_demo
python manage.py createsuperuser
python manage.py runserver 127.0.0.1:8000
migrate creates database tables, bootstrap_demo creates a sample page and product, and createsuperuser creates your local admin login. Password input may be invisible. The last command keeps the server running. Open the site and admin. This account belongs only to your practice database. Never run bootstrap_demo on a live site.
Sign in, post a comment on the page and approve it under Comments. Review is enabled by default, so a pending message is expected.
Confirm a guest locally
Stop the server with Ctrl+C. Replace the existing EMAIL_BACKEND and DEFAULT_FROM_EMAIL in example/demo/settings.py:
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
DEFAULT_FROM_EMAIL = "comments@example.invalid"
Restart the server. In a second terminal, activate the same environment and change into example. Post as a guest in a private browser window, then run:
python manage.py process_commentail
The worker prints the email in its own terminal. Copy the confirmation link into the same private browser, open it and press Confirm. Approve the comment in the admin. No message goes to an inbox.
Check that another browser sees the approved text but cannot see someone else's pending card. Stop the server with Ctrl+C when finished. The example's development server, DEBUG setting and local secrets are unsuitable for a public deployment.
Related lessons
- 2. Add Commentail to an existing Wagtail site
- 3. Site settings and the reader journey
- 5. Environment variables without key confusion
Choose a sign-in method or comment as a guest below.