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: 10 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 (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-28T13:58:54.000Z (about 1 month ago)
- Last Synced: 2024-10-18T07:53:12.038Z (22 days ago)
- Language: Python
- Homepage: https://djp.readthedocs.io
- Size: 44.9 KB
- Stars: 79
- Watchers: 2
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DJP: Django Plugins
[![PyPI](https://img.shields.io/pypi/v/djp.svg)](https://pypi.org/project/djp/)
[![Tests](https://github.com/simonw/djp/actions/workflows/test.yml/badge.svg)](https://github.com/simonw/djp/actions/workflows/test.yml)
[![Changelog](https://img.shields.io/github/v/release/simonw/djp?include_prereleases&label=changelog)](https://github.com/simonw/djp/releases)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](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
```