MCPSERV.CLUB
django-wiki

django-wiki

Self-Hosted

Collaborative wiki built on Django, supporting Markdown editing

Active(89)
1.9kstars
0views
Updated 12 days ago

Overview

Discover what makes django-wiki powerful

**django‑wiki** is a lightweight, fully self‑hosted wiki engine built on the Django web framework. From a developer’s standpoint it offers a clean, extensible architecture that lets you embed rich‑text editing, version control, and permission handling directly into any Django project. The core of the application is a set of reusable Django apps that expose a REST‑like API for programmatic access, while still providing the classic Wiki URL scheme (`/wiki/<page>`) that users recognize.

Framework

Language

Database

Front‑end

Overview

django‑wiki is a lightweight, fully self‑hosted wiki engine built on the Django web framework. From a developer’s standpoint it offers a clean, extensible architecture that lets you embed rich‑text editing, version control, and permission handling directly into any Django project. The core of the application is a set of reusable Django apps that expose a REST‑like API for programmatic access, while still providing the classic Wiki URL scheme (/wiki/<page>) that users recognize.

Technical Stack & Architecture

  • Framework: Django 3.x/4.x – the application follows Django’s “app” pattern, making it trivial to drop into an existing project or run as a standalone service.
  • Language: Python 3.9+; all business logic is written in idiomatic Django, leveraging the ORM for database interactions.
  • Database: Supports any relational backend supported by Django (PostgreSQL, MySQL, SQLite). The schema is minimal: a Page model with fields for title, slug, content (Markdown), and revision history.
  • Front‑end: Uses Django templates with optional Bootstrap integration for styling. Markdown rendering is handled by django‑markdownify or similar libraries, allowing server‑side conversion to HTML.
  • Search: Optional integration with PostgreSQL’s full‑text search or external tools like ElasticSearch for larger deployments.

The application is split into three logical layers:

  1. Models – represent pages, revisions, and permissions.
  2. Views/Controllers – class‑based views that handle CRUD operations, authentication checks, and rendering.
  3. Templates/Serializers – provide both HTML pages for end‑users and JSON endpoints for developers.

Core Capabilities & APIs

  • Revision Tracking – each edit creates a new Revision object; the API exposes endpoints to list, diff, and revert revisions.
  • Permission System – built on Django’s auth framework; supports per‑page read/write permissions, group overrides, and anonymous access settings.
  • Markdown Support – all content is stored as Markdown; the API returns both raw and rendered HTML.
  • RESTful Endpoints/api/pages/ and /api/revisions/ allow CRUD operations; authentication can be token‑based (DRF) or session‑based.
  • Webhooks – developers can register callbacks that fire on page creation, update, or deletion, enabling integrations with CI/CD pipelines or chatops.
  • Plugin Hooks – the signals framework allows custom plugins to inject behavior (e.g., automatic tagging, external storage).

Deployment & Infrastructure

  • Self‑Hosting – the app can run under any WSGI server (Gunicorn, uWSGI) behind Nginx or Apache.
  • Containerization – a Dockerfile is included; images can be built from the source or pulled from a registry.
  • Scalability – stateless Django processes can be scaled horizontally; the database layer is the primary bottleneck, so a robust RDBMS (PostgreSQL) with proper indexing is recommended.
  • Data Persistence – all revisions are stored in the database; for backup, standard DB dumps or logical replication can be used.

Integration & Extensibility

  • Extensible via Django Apps – developers can write their own apps that import the wiki models and register new URLs or admin panels.
  • Custom Rendering – replace the Markdown renderer with a custom parser (e.g., mistune, markdown-it-py) by overriding the template tag.
  • API Clients – several community clients exist (Python, JavaScript) that consume the REST endpoints; developers can also build their own.
  • Webhooks & Events – the app emits signals for post_save and pre_delete, which can be captured to trigger external processes.

Developer Experience

  • Configuration – settings are minimal; most behavior is controlled via Django’s settings.py.
  • Documentation – the README and inline docstrings provide clear guidance on models, API usage, and deployment.
  • Community – the project hosts a Google Group for support; issue tracking on GitHub allows quick bug reporting and feature requests.
  • Testing – a comprehensive test suite (unit + integration) ensures that new contributors can safely modify the codebase.

Use Cases

  • Internal Knowledge Bases – teams can embed a wiki within their Django‑based intranet, leveraging existing auth and permission systems.
  • Documentation for Open‑Source Projects – the Markdown workflow makes it easy to sync with Git repositories or publish static snapshots.
  • Learning Platforms – educators can provide a collaborative editing environment for course materials without external SaaS dependencies.
  • Compliance & Auditing – the revision history and permission controls satisfy audit requirements for regulated industries.

Advantages Over Alternatives

  • Full Control – unlike SaaS wikis, the source code is fully accessible; developers can modify rendering logic or add custom fields.
  • Python Ecosystem – tight integration with Django means you can reuse existing models, middleware, and admin interfaces.
  • Open‑Source Licensing – permissive MIT license allows commercial use without licensing fees.
  • Lightweight Footprint – the minimal database schema and optional dependency set keep resource usage low, ideal for small servers or Kubernetes deployments.

In summary, django‑wiki offers a robust, Pythonic platform for building and

Open SourceReady to get started?

Join the community and start self-hosting django-wiki today

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
other
License
GPL-3.0
Stars
1.9k
Technical Specs
Pricing
Open Source
Database
SQLite
Supported OS
LinuxDocker
Author
django-wiki
django-wiki
Last Updated
12 days ago