Lightweight set of middleware classes that inject visual indicators for each type of environment that a project isdeployed to.
Project description
# django-envi
Lightweight set of middleware classes that inject visual indicators for each type of environment that a project is deployed to. Inspired by [this article][1].
![Illustration image][2]
## Quickstart
Install the package: pip install django-environments.
Add the ‘environments’ app to your INSTALLED_APPS.
Install the desired middleware class to MIDDLEWARE_CLASSES: * environments.middleware.EnvironmentFooterMiddleware injects a sticky footer to all pages that displays the current environment.
In each environment’s settings file, add the ENVIRONMENT_KEY setting, with its value set to one of: * ‘local’: A striped grey banner. Appears site-wide (_default_). * ‘dev’: A striped blue banner. Appears site-wide. * ‘staging’: A striped yellow banner. Appears site-wide. * ‘production’: A striped red banner. Only appears in /admin.
## Configuration
TODO: Notes on the various options available.
## Creating environments
TODO: How to.
## Advanced usage
### Extending via templates
TODO: How to.
### Extending via subclassing
TODO: How to.
[1]: https://hackernoon.com/5-ways-to-make-django-admin-safer-eb7753698ac8 “Hackernoon article” [2]: https://raw.githubusercontent.com/teapow/django-envi/master/docs/images/collage.png “Example usage within /admin”
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
File details
Details for the file django-envi-0.1.2.tar.gz
.
File metadata
- Download URL: django-envi-0.1.2.tar.gz
- Upload date:
- Size: 102.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
b19151478351d01688dc0f221215220cb3a144e9571816c0264d748c312c9ab2
|
|
MD5 |
068a15753016ae9539c21cfcaf24b4e7
|
|
BLAKE2b-256 |
a249b10be0db29f624023e4b49c3fdf0c8b682b92c8ebbd29c40079185208ff8
|