Skip to main content

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

  1. Install the package: pip install django-environments.

  2. Add the ‘environments’ app to your INSTALLED_APPS.

  3. Install the desired middleware class to MIDDLEWARE_CLASSES: * environments.middleware.EnvironmentFooterMiddleware injects a sticky footer to all pages that displays the current environment.

  4. 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

django-envi-0.1.1.tar.gz (102.3 kB view details)

Uploaded Source

File details

Details for the file django-envi-0.1.1.tar.gz.

File metadata

  • Download URL: django-envi-0.1.1.tar.gz
  • Upload date:
  • Size: 102.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-envi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e8f5fcbf0c50f75a5e104fa69a2e201ce2e00a12ac590fce5ea9055038ba2b12
MD5 ab994191335e0b1096fd5e4d393003d3
BLAKE2b-256 24bee4f9f409f17012fdec16b15baaff1c0d6dadff19d2d187af46a02e85b76d

See more details on using hashes here.

Supported by

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