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.2.tar.gz (102.8 kB view details)

Uploaded Source

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

Hashes for django-envi-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b19151478351d01688dc0f221215220cb3a144e9571816c0264d748c312c9ab2
MD5 068a15753016ae9539c21cfcaf24b4e7
BLAKE2b-256 a249b10be0db29f624023e4b49c3fdf0c8b682b92c8ebbd29c40079185208ff8

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