Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simonw/djp
A plugin system for Django
https://github.com/simonw/djp
Last synced: 5 days ago
JSON representation
A plugin system for Django
- Host: GitHub
- URL: https://github.com/simonw/djp
- Owner: simonw
- License: apache-2.0
- Created: 2024-09-22T22:38:11.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-09-28T13:58:54.000Z (5 months ago)
- Last Synced: 2025-02-15T06:33:09.417Z (5 days ago)
- Language: Python
- Homepage: https://djp.readthedocs.io
- Size: 44.9 KB
- Stars: 99
- Watchers: 3
- Forks: 4
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DJP: Django Plugins
[](https://pypi.org/project/djp/)
[](https://github.com/simonw/djp/actions/workflows/test.yml)
[](https://github.com/simonw/djp/releases)
[](https://github.com/simonw/djp/blob/main/LICENSE)A plugin system for Django
Visit **[djp.readthedocs.io](https://djp.readthedocs.io/)** for full documentation, including how to install plugins and how to write new plugins.
See [DJP: A plugin system for Django](https://simonwillison.net/2024/Sep/25/djp-a-plugin-system-for-django/) for an introduction to this project.
## Installation
Install this library using `pip`:
```bash
pip install djp
```## Configuration
Add this to the **end** of your `settings.py` file:
```python
import djp# ... existing settings.py contents
djp.settings(globals())
```
Then add this to your URL configuration in `urls.py`:
```python
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:
```bash
cd djp
python -m venv venv
source venv/bin/activate
```
Now install the dependencies and test dependencies:
```bash
python -m pip install -e '.[test]'
```
To run the tests:
```bash
python -m pytest
```