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.

Compatibility

The package metadata declares a minimum of wagtail>=6.0; that is the supported floor, not the full test matrix. The two tested configurations differ in kind: Wagtail 8.0.1 is covered by integration tests of the originating project with editable installs of this package, while Wagtail 8.1 was tested against the target production stack with clean wheel and sdist installs — both with Django 6.0.9 on Python 3.14. Other combinations may work but are not covered by the test suite.

Requirements and installation

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

pip install wagtail-simple-forum==0.1.2
python -m pip install .

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.2

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.2
File Size Uploaded Provenance Actions
wagtail_simple_forum-0.1.2.tar.gz 55.6 kB Without provenance Details for wagtail_simple_forum-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 126.4 kB

Release files / wagtail_simple_forum-0.1.2.tar.gz

Download URL wagtail_simple_forum-0.1.2.tar.gz
Size 55.6 kB
Tags Source
SHA-256 checksum
How to use checksums
df2d0e533b8d0a8b1a6e30c4e81e2fb4ac31e8acc52570a1d04dd4ab7ca32634
BLAKE2b-256 checksum
How to use checksums
0b5ed64e27c3f61b05869eb64972a5a4ba2140e4aafcc09ed9f07f16152cb248
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.2-py2.py3-none-any.whl

Download URL wagtail_simple_forum-0.1.2-py2.py3-none-any.whl
Size 70.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
bd2a3787c6e17b75d4ee998022a6c261048382172a205fa80534afefb385bb7c
BLAKE2b-256 checksum
How to use checksums
c06cdffbdf07b91f2c59d025e4fe9015cd00cb3ed9b5b7ed8520ad4200329cf6
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.2

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