simonw / djp

A plugin system for Django
https://djp.readthedocs.io
Apache License 2.0
90 stars 2 forks source link

DJP: Django Plugins

PyPI Tests Changelog License

A plugin system for Django

Visit djp.readthedocs.io for full documentation, including how to install plugins and how to write new plugins.

See DJP: A plugin system for Django for an introduction to this project.

Installation

Install this library using pip:

pip install djp

Configuration

Add this to the end of your settings.py file:

import djp

# ... existing settings.py contents

djp.settings(globals())

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

urlpatterns = [
    # ...
] + djp.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