A plugin system for Django
Project description
Django Plugins
A plugin system for Django
Installation
Install this library using pip
:
pip install djp
Configuration
Add this to your settings.py
file:
import djp
# ...
INSTALLED_APPS = [
"your_app1",
"your_app2",
] + djp.installed_apps()
# ...
MIDDLEWARE = djp.middleware([
"your_middleware1",
"your_middleware2",
])
# And at the very end of that file:
djp.settings(globals())
And 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
djp-0.1a1.tar.gz
(6.7 kB
view details)
Built Distribution
djp-0.1a1-py3-none-any.whl
(7.0 kB
view details)
File details
Details for the file djp-0.1a1.tar.gz
.
File metadata
- Download URL: djp-0.1a1.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9a24cc1d13589e685e6f16e5e057de434012cc814c46db528253032b19e9ef2 |
|
MD5 | 3cdf8c4e4b915784d7d18508707bd326 |
|
BLAKE2b-256 | 3d5fa4681f6d7b7344a68b64fdad0b7d4bc93575007fc96f1bd956e9c8e69487 |
File details
Details for the file djp-0.1a1-py3-none-any.whl
.
File metadata
- Download URL: djp-0.1a1-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9814e695124b8e19e0e18d42998450bbecdf941b1a13f32ab14a8c977983a03e |
|
MD5 | 6820e3265400baaf0ac1162f2ed48a14 |
|
BLAKE2b-256 | de8a72a970a0e957343201323b2f3cc178b766fc0cb2ef4ed4b3e16bdff1baf9 |