Skip to main content

A plugin system for Django

Project description

DJP: 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 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


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.1a2.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

djp-0.1a2-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file djp-0.1a2.tar.gz.

File metadata

  • Download URL: djp-0.1a2.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for djp-0.1a2.tar.gz
Algorithm Hash digest
SHA256 a4051a0e14c03342b23065d9600de4540aabb858e767f0ae7f6f60ec84aa796e
MD5 53140f6ef39e4310788068b39451a9c3
BLAKE2b-256 c0640a3ab575ef28520da72af7dc2dc9858ccc8d5af35099fcf130a3032e3775

See more details on using hashes here.

File details

Details for the file djp-0.1a2-py3-none-any.whl.

File metadata

  • Download URL: djp-0.1a2-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for djp-0.1a2-py3-none-any.whl
Algorithm Hash digest
SHA256 d873284cdadc84de99ea3f83e3abe6ca392e7b16d7bb97b97eca8bd7c9116475
MD5 a17a7e7e1f08efb4f8e954d717102595
BLAKE2b-256 2dc7fcef1f98e0613f2a55c5fa826c963a0a7427ed737e68d4a9fbe248b89772

See more details on using hashes here.

Supported by

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