Skip to main content

wagtail-simple-forum

A lightweight forum integrated with Wagtail admin. It provides categories, sections, topics, posts, private messages, moderation, notifications, search, rate limiting, and legacy-URL/import helpers. Content uses the site's Django users and the django-prose-editor / nh3 stack rather than an external forum engine.

English · Русский · Deutsch · Español · Français · Italiano · Português (Brasil) · Nederlands · Polski · Türkçe · 简体中文 · 日本語 · 한국어

Features

  • Category → section → topic → post hierarchy, with maintained counters and latest-activity metadata.
  • Private-message inbox and conversation threads with pagination and optional recipient notifications.
  • Guest posting controls: moderation, honeypot, a signed timestamp token, a signed math challenge, per-session replay detection, and cache-based rate limits.
  • Topic moderation: pin/close, approve, soft-delete, moderator groups, and optional staff moderation.
  • Search, view counters with time-based deduplication, Unicode slugs, and legacy forum redirects.
  • Import command for the old forum app, preserving legacy_id links and legacy user mappings.
  • Template overrides and CSS hooks for matching a site's theme.

Audit/release status

This source bundle prepares version 0.1.1 for a possible next release. Static syntax/package checks have been run, but a full Django/Wagtail integration suite has not run in the bundle build environment. Do not upload to PyPI until the release checklist in ../../04-docs/UPGRADE_AND_RELEASE.md is complete.

Requirements and installation

Package metadata declares wagtail>=6.0, django-prose-editor>=0.26, and nh3>=0.2.14.

pip install wagtail-simple-forum

To install the candidate source in this bundle (rather than the already-published PyPI release), run from this package directory:

python -m pip install .
# For editable development instead:
python -m pip install -e .

pip install wagtail-simple-forum selects the version currently published on PyPI. The candidate version shown in pyproject.toml is not published by this archive operation; publish it only after the release checklist in ../../04-docs/UPGRADE_AND_RELEASE.md passes.

Add the app after its dependencies:

INSTALLED_APPS = [
    # ... Django and Wagtail apps ...
    "django_prose_editor",
    "wagtail_simple_forum",
]

Mount the routes. If you need redirects from an older forum, include the legacy URL patterns before Wagtail's catch-all route:

from django.urls import include, path
from wagtail_simple_forum.legacy_urls import urlpatterns as legacy_forum_urls

urlpatterns = [
    path("forum/", include("wagtail_simple_forum.urls")),
    *legacy_forum_urls,
    # Wagtail's catch-all route goes last.
]

Then run:

python manage.py migrate wagtail_simple_forum

Configuration

All options are optional. Defaults below reflect the current package source.

Setting Default Purpose
FORUM_ALLOWED_HOSTS None Restrict forum routes to a list of host names. None allows any host accepted by Django. Configure this on multi-site projects.
FORUM_ALLOW_GUESTS True Allow guest topics/replies.
FORUM_MODERATE_GUESTS True Send guest posts for moderation.
FORUM_STAFF_ARE_MODERATORS True Treat is_staff users as forum moderators.
FORUM_MODERATOR_GROUPS None Django group names that grant moderator capabilities.
FORUM_TRUST_PROXY_HEADERS False Trust proxy-supplied client IP headers; enable only behind a trusted, header-sanitizing proxy.
FORUM_AVATAR_URL_GETTER None Dotted import path to a callable get_avatar_url(user) -> str.
FORUM_TRACK_VIEWS True Enable topic view counts.
FORUM_TOPIC_POSTS_PER_PAGE 20 Posts per topic page.
FORUM_SECTION_TOPICS_PER_PAGE 30 Topics per section page.
FORUM_SEARCH_RESULTS_PER_PAGE 20 Search results per page.
FORUM_MAX_POST_LENGTH 65535 Maximum post length.
FORUM_MAX_PM_LENGTH 20000 Maximum private-message length.
FORUM_NOTIFY_ADMINS True Email administrators about new topics/replies.
FORUM_NOTIFY_TOPIC_AUTHOR True Notify a topic author about replies.
FORUM_NOTIFY_PM_RECIPIENT True Notify a private-message recipient.
FORUM_LEGACY_REDIRECT_PERMANENT True Use permanent (301) legacy redirects rather than temporary redirects.
FORUM_BASE_URL BASE_URL or empty Base URL used when generating absolute links in email.

Example for a site that should not accept arbitrary hosts:

FORUM_ALLOWED_HOSTS = ["forum.example.com"]
FORUM_ALLOW_GUESTS = True
FORUM_MODERATE_GUESTS = True
FORUM_MODERATOR_GROUPS = ["Forum moderators"]
FORUM_TRUST_PROXY_HEADERS = False

Email notifications require working Django email settings. Do not enable proxy-header trust unless the reverse proxy removes client-supplied versions of those headers and sets authoritative values.

Customizing templates

Override wagtail_simple_forum/base_forum.html in your project to integrate site navigation, page width, fonts, and theme. The package ships an example template. Keep the block names used by the package templates when overriding the base. CSS is served from wagtail_simple_forum/css/forum.css; add theme overrides in your own static files rather than patching the package.

Importing from the old forum app

The package includes an idempotent import command. Back up the database first, keep the old app installed during the dry run, and compare imported counts before switching traffic:

python manage.py migrate wagtail_simple_forum
python manage.py forum_import_from_app --source forum --dry-run
python manage.py forum_import_from_app --source forum
python manage.py forum_recalculate_stats

The old app must be available to Django while the importer reads it. After validating topics, posts, private messages, legacy IDs, users, and redirects, update URLs and then remove the old app only when no other code depends on its models. Keep a restorable database backup throughout the migration.

Security and operations

  • Run the package migrations and test posting as a guest, member, moderator, and administrator. Also verify that private-message inboxes and thread pages display paginated results, required hidden anti-spam fields are rendered, and closed topics cannot be edited/deleted by regular owners.
  • Check rate limits, moderation, private-message access, signed-token expiry/replay behavior, and email content in a staging environment. Token reuse is tracked per browser session to remain compatible with shared page caches.
  • Do not render stored post HTML with an unconditional |safe; use the package rendering/sanitization path.
  • Test legacy redirects before making them permanent; permanent redirects can be cached by browsers and search engines.
  • The source bundle does not include a full automated test suite or a version-by-version runtime compatibility matrix.
  • wagtail-mptt-comments is complementary for comments below individual articles; the forum provides longer discussions and private messaging.
  • wagtail-prose-editor-images is useful if you want Wagtail's image chooser in custom Prose editor fields. The forum itself has its own post editor and does not require the chooser plugin.
  • Image directory management is optional and independent of forum data.

License and support

MIT. Source and issue tracker: GitHub. Include package version and relevant Django/Wagtail settings in reports; never include tokens or private messages.

Metadata

Release files for wagtail-simple-forum 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wagtail-simple-forum 0.1.1
File Size Uploaded Provenance Actions
wagtail_simple_forum-0.1.1.tar.gz 55.6 kB Without provenance Details for wagtail_simple_forum-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wagtail-simple-forum 0.1.1
File Interpreter ABI Platform Actions
wagtail_simple_forum-0.1.1-py2.py3-none-any.whl Python 2, Python 3 none any Details for wagtail_simple_forum-0.1.1-py2.py3-none-any.whl

Total release size: 126.5 kB

Release files / wagtail_simple_forum-0.1.1.tar.gz

Download URL wagtail_simple_forum-0.1.1.tar.gz
Size 55.6 kB
Tags Source
SHA-256 checksum
How to use checksums
221abf569d4b310624e36a04c8f94059d69b3f36490fe8f21f0ce7bc8268593c
BLAKE2b-256 checksum
How to use checksums
aefcfc14ef7cbe12e4d7cef56980cf6fa5a3a01ccd83ccf9dd59eaad641275c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / wagtail_simple_forum-0.1.1-py2.py3-none-any.whl

Download URL wagtail_simple_forum-0.1.1-py2.py3-none-any.whl
Size 70.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
561c6b83038dba0b401735c3a69e82e71acabda9456ce64b38c7fd5bcb0c0f87
BLAKE2b-256 checksum
How to use checksums
3a0ba764b5d63d6be3fb76ad4a1a7def4c75631540a35fa3b459fc7c07374e13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for wagtail-simple-forum 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page