Skip to main content

A plugin system for Django

Project description

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 django_plugins

# ...

INSTALLED_APPS = [
    "your_app1",
    "your_app2",
] + django_plugins.installed_apps()

# ...

MIDDLEWARE = django_plugins.middleware([
    "your_middleware1",
    "your_middleware2",
])

# And at the very end of that file:
django_plugins.settings(globals())

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

urlpatterns = [
    # ...
] + django_plugins.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.1a0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

djp-0.1a0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for djp-0.1a0.tar.gz
Algorithm Hash digest
SHA256 4232c013f0148e000a5a27ca99dd221e06d1d257c505e1fcee38b8b173dcbf80
MD5 bde5a09fb3571a5a0bf43192898022d4
BLAKE2b-256 bfa47d20c4b6f450c3ea7b655a404d71c8c0b067e0457211688cedba83077069

See more details on using hashes here.

File details

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

File metadata

  • Download URL: djp-0.1a0-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

Hashes for djp-0.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7aa347bfd8f92c5f7f1533cee57ea550798359c8796a9510d7dee6634be54b4
MD5 fc620f6b7b72ce8d8641cc517a0a77e4
BLAKE2b-256 2b2e21a4d4a75fd41b99d7665c171629855a7100841ea30b9c4d18a9de29edcc

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