Open edX Django Wiki

raw JSON →
3.1.1 verified Fri May 01 auth: no python

A wiki system for Django, forked and maintained by Open edX. Current version is 3.1.1. It supports Django 3.2 to 4.2 and Python 3.8 to 3.11. Active development with irregular releases.

pip install openedx-django-wiki
error ModuleNotFoundError: No module named 'wiki'
cause You installed the wrong package or the package is not installed. The module is 'wiki', not 'openedx_django_wiki'.
fix
Run: pip install openedx-django-wiki and then import wiki in your code.
error django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: wiki
cause You have both 'django-wiki' and 'openedx-django-wiki' installed, or you have conflicting apps in INSTALLED_APPS.
fix
Uninstall both and reinstall only openedx-django-wiki. Ensure only one wiki app is in INSTALLED_APPS.
error AttributeError: module 'wiki' has no attribute 'get_pattern'
cause Incorrect import path. The get_pattern function is in wiki.urls.
fix
Use: from wiki.urls import get_pattern. Then call get_pattern().
error ImportError: cannot import name 'WikiDecoratorMixin' from 'wiki.core.decorators'
cause The module location changed in v2.0.0.
fix
Change import to: from wiki.decorators import WikiDecoratorMixin
error django.core.management.base.SystemCheckError: SystemCheckError: Issue with 'wiki' models [...]
cause Missing required Django apps: mptt, sekizai, django_nyt.
fix
Add 'mptt', 'sekizai', 'django_nyt' to INSTALLED_APPS.
breaking From v2.0.0, support for Django 3.2 was dropped. Python 3.11 was added in v2.1.0. If upgrading from v1.x, check your Django version compatibility.
fix Ensure you are using Django >=4.0 or upgrade to v2.1.0+ for Python 3.11.
breaking In v2.0.0, the bleach library was updated, which may affect HTML sanitization in wiki content. Custom white-lists may need adjustment.
fix Review your bleach configuration if you rely on specific allowed tags or attributes.
gotcha The package name on PyPI is 'openedx-django-wiki', but the module is still 'wiki'. Do not confuse with the older 'django-wiki' package by benjaoming.
fix Install 'openedx-django-wiki' but import as 'from wiki import ...'.
deprecated From v3.1.0, the wiki.plugins.images plugin has been removed. Use attachments or macros instead.
fix Remove 'wiki.plugins.images' from INSTALLED_APPS and migrate any image content.
breaking In v2.1.0, Django 3.2 support was removed. Ensure your project uses Django 4.0+.
fix Upgrade Django to 4.0, 4.1, or 4.2.

Minimal Django configuration to verify the wiki app can be imported and URL patterns generated.

import django
from django.conf import settings
settings.configure(
    DATABASES={'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:'}},
    INSTALLED_APPS=[
        'django.contrib.contenttypes',
        'django.contrib.auth',
        'django.contrib.sessions',
        'django.contrib.admin',
        'wiki',
        'wiki.plugins.attachments',
        'wiki.plugins.notifications',
        'wiki.plugins.links',
        'wiki.plugins.macros',
        'django_nyt',
        'mptt',
        'sekizai',
    ],
    ROOT_URLCONF='wiki.urls',
)
django.setup()
from wiki.urls import get_pattern
urlpatterns = [get_pattern()]
print('Wiki app configured successfully')