Collaborative staff wiki for Django Admin — edit in the browser, search with Postgres.
Project description
django-admin-wiki
Collaborative staff wiki for Django Admin — edit in the browser, search with Postgres.
A reusable Django app for internal / back-office documentation next to django.contrib.admin.
Not a public MediaWiki clone.
Features
- In-browser WYSIWYG editing (Summernote by default; switchable to textarea or a custom widget)
- Up to three-level navigation tree
- Full-text search (PostgreSQL FTS) with SQLite/MySQL substring fallback
- Revision history on every staff save
- Import from Markdown / MkDocs (
import_mkdocs) - Visible link from Django admin (Wiki pages changelist)
- Premium cloud mode: Hosted on our servers via API (no local wiki tables)
Requirements
- Python ≥ 3.10
- Django ≥ 4.2, < 6
- PostgreSQL recommended for production search (
django.contrib.postgres) whenSTORAGE="local"
Install (5 minutes) — self-hosted (OSS)
pip install django-admin-wiki
# settings.py
INSTALLED_APPS = [
...,
"django.contrib.postgres", # if using Postgres FTS
"django_summernote", # required for default WYSIWYG editor
"django_admin_wiki",
]
MEDIA_URL = "/media/"
MEDIA_ROOT = BASE_DIR / "media"
DJANGO_ADMIN_WIKI = {
"STORAGE": "local",
"SEARCH_BACKEND": "postgres", # or "fallback"
"SEARCH_CONFIG": "french",
"EDITOR": "summernote",
"ALLOW_MARKDOWN_READ": True,
"DOCS_DIR": BASE_DIR / "wiki_docs",
"MKDOCS_YML": BASE_DIR / "wiki_docs" / "mkdocs.yml",
"URL_PREFIX": "wiki/",
# Media: default local FS under DOCS_DIR/uploads via POST /wiki/media/upload/
# "MEDIA_BACKEND": "django", # use Django STORAGES (S3) instead
# "MEDIA_MAX_UPLOAD_BYTES": 5 * 1024 * 1024,
}
Images in the editor are uploaded as files (no base64 in the database). Optional S3 for self-hosted:
pip install "django-admin-wiki[s3]"
# settings — host-owned bucket
INSTALLED_APPS += ["storages"]
STORAGES = {
"default": {
"BACKEND": "storages.backends.s3.S3Storage",
"OPTIONS": { ... },
},
"staticfiles": {"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"},
}
DJANGO_ADMIN_WIKI = {..., "MEDIA_BACKEND": "django"}
# urls.py
path("summernote/", include("django_summernote.urls")),
path("wiki/", include("django_admin_wiki.urls")),
python manage.py migrate
python manage.py setup_wiki_groups # creates "Wiki readers" + "Wiki editors"
python manage.py runserver
Then assign users to a group in Django Admin → Users (or Groups). is_staff alone does not grant wiki access.
Premium — cloud storage (no local wiki tables)
Subscribe at django-admin-wiki.enprod.fr. You receive write and read-only API keys from the account dashboard.
INSTALLED_APPS = [..., "django_summernote", "django_admin_wiki"]
# Prevent host migrate from creating wiki tables:
MIGRATION_MODULES = {"django_admin_wiki": None}
DJANGO_ADMIN_WIKI = {
"STORAGE": "cloud",
"CLOUD_API_URL": "https://django-admin-wiki.enprod.fr",
"CLOUD_API_KEY": "daw_live_...", # write key (editors)
"CLOUD_API_KEY_READ": "daw_live_...", # read-only key (readers)
"EDITOR": "summernote",
}
path("summernote/", include("django_summernote.urls")),
path("wiki/", include("django_admin_wiki.urls")),
# Do NOT run migrations for django_admin_wiki
Isolation: every API request is scoped by the tenant bound to your API key. Tenant A cannot read Tenant B data.
Read vs write (client Django users)
| URL | Who can enter |
|---|---|
/admin/ |
Django Admin → needs is_staff (always) |
/wiki/ |
membership in Wiki readers or Wiki editors (not is_staff) |
Rights follow the logged-in user of your Django project (session cookie). Cloud SaaS accounts (email/password on the Premium site) only manage billing / API keys.
After migrate (or python manage.py setup_wiki_groups), two groups exist:
| Group | Can |
|---|---|
| Wiki readers | open /wiki/, search, view pages |
| Wiki editors | readers + create / edit / upload media |
Assign users in Django Admin → Users. Superusers always have full wiki access.
Premium cloud mode — dual API keys
The host app holds two keys; the package picks one from request.user:
| User group | Key used |
|---|---|
Wiki editors (wiki_can_write) |
CLOUD_API_KEY |
| Wiki readers | CLOUD_API_KEY_READ |
Create both keys from the account dashboard. The cloud API rejects writes on a read-only key.
See docs/PREMIUM.md.
Change the editor
DJANGO_ADMIN_WIKI = {"EDITOR": "textarea"} # or "custom" + EDITOR_WIDGET
Import existing MkDocs docs (local mode)
python manage.py import_mkdocs
python manage.py refresh_wiki_search_vectors # Postgres
Settings reference
| Key | Default | Description |
|---|---|---|
STORAGE |
"local" |
"local" (host DB) or "cloud" (Premium API) |
CLOUD_API_URL |
"" |
Base URL of the cloud API |
CLOUD_API_KEY |
"" |
Bearer write key daw_live_… |
CLOUD_API_KEY_READ |
"" |
Bearer read-only key (readers in cloud mode) |
SEARCH_BACKEND |
"postgres" |
local mode only |
SEARCH_CONFIG |
"french" |
local Postgres FTS config |
EDITOR |
"summernote" |
summernote, textarea, or custom |
EDITOR_WIDGET |
None |
Dotted path when EDITOR="custom" |
ALLOW_MARKDOWN_READ |
True |
Convert legacy Markdown on read |
DOCS_DIR / MKDOCS_YML |
wiki_docs |
MkDocs import (local) |
HOME_SLUG |
"index" |
Home page slug |
URL_PREFIX |
"wiki/" |
Link rewrite prefix for import |
MAX_NAV_DEPTH |
3 |
Max menu depth (root → …) |
Breaking choices (v1)
- Postgres recommended for local FTS; SQLite uses fallback search
- Summernote is the default editor
- Navigation is up to three levels (root → section → page)
- Cloud mode uses shared DB with
tenant_idisolation (not DB-per-customer)
Example project
From the repository root:
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
cd example_project
python manage.py migrate
python manage.py setup_wiki_groups
python manage.py import_mkdocs
python manage.py createsuperuser
python manage.py runserver
See example_project/README.md.
License
See CHANGELOG.md for release notes.
BSD-3-Clause (OSS / local mode). Premium cloud hosting is a commercial subscription.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_admin_wiki-0.1.1.tar.gz.
File metadata
- Download URL: django_admin_wiki-0.1.1.tar.gz
- Upload date:
- Size: 32.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37bbc417a17ea93943483f83b019fb467c5c12cd2039ab44a669abf7aef742da
|
|
| MD5 |
626082da9a6277541661cb436971b4b2
|
|
| BLAKE2b-256 |
786664c98f7905779f069cd3e4e22bc7924e96b4b1e9f419d327fdfa1a2ad01d
|
Provenance
The following attestation bundles were made for django_admin_wiki-0.1.1.tar.gz:
Publisher:
publish.yml on csurbier/the-django-admin-wiki
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_admin_wiki-0.1.1.tar.gz -
Subject digest:
37bbc417a17ea93943483f83b019fb467c5c12cd2039ab44a669abf7aef742da - Sigstore transparency entry: 2226285959
- Sigstore integration time:
-
Permalink:
csurbier/the-django-admin-wiki@dba4eb50d0ae230e218db053e247a454aea55312 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/csurbier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dba4eb50d0ae230e218db053e247a454aea55312 -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_admin_wiki-0.1.1-py3-none-any.whl.
File metadata
- Download URL: django_admin_wiki-0.1.1-py3-none-any.whl
- Upload date:
- Size: 40.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7213bf12d6c4f2faefdab3ef40aaf85578a5426c4c333cc1b0fb2cdc749a833
|
|
| MD5 |
8e5bf07c056f184790abcd6efbae0075
|
|
| BLAKE2b-256 |
55539757f0317236b8fa780c8d22ffc60a24bd7389e858928e9bdbee559d05e4
|
Provenance
The following attestation bundles were made for django_admin_wiki-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on csurbier/the-django-admin-wiki
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_admin_wiki-0.1.1-py3-none-any.whl -
Subject digest:
d7213bf12d6c4f2faefdab3ef40aaf85578a5426c4c333cc1b0fb2cdc749a833 - Sigstore transparency entry: 2226286079
- Sigstore integration time:
-
Permalink:
csurbier/the-django-admin-wiki@dba4eb50d0ae230e218db053e247a454aea55312 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/csurbier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dba4eb50d0ae230e218db053e247a454aea55312 -
Trigger Event:
push
-
Statement type: