Skip to main content
2025 Python Packaging Survey is now live!  Take the survey now

A plugin system for Django

Project description

Django Plugins

PyPI Tests Changelog License

A plugin system for Django

Installation

Install this library using pip:

pip install djp

Configuration

Add this to your settings.py file:

import django_plugins

# ...

INSTALLED_APPS = [
    "your_app1",
    "your_app2",
] + django_plugins.installed_apps()

# ...

MIDDLEWARE = django_plugins.middleware([
    "your_middleware1",
    "your_middleware2",
])

# And at the very end of that file:
django_plugins.settings(globals())

And add this to your URL configuration in urls.py:

urlpatterns = [
    # ...
] + django_plugins.urlpatterns()

Usage

Installing a plugin in the same environment as your Django application should cause that plugin to automatically add the necessary

Development

To contribute to this library, first checkout the code. Then create a new virtual environment:

cd djp
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

python -m pip install -e '.[test]'

To run the tests:

python -m pytest

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page