Skip to main content

A system/environment indicator for django

Project description

django-sys-indicator

pre-commit.ci status GitHub license GitHub issues

A visual indicator of what environment/system you're using in django.

system indicator examples

To install:

  • Add 'django_sys_indicator.apps.DjangoSysIndicatorConfig' to your INSTALLED_APPS
  • Add 'django_sys_indicator.middleware.SystemIndicatorMiddleware' to you MIDDLEWARE

Configuration settings and their defaults

SYSTEM_INDICATOR_ENABLED = False
SYSTEM_INDICATOR_LABEL = 'localhost'
SYSTEM_INDICATOR_COLORS = {
    # Format here is colour, border colour
    'red': ('#c50000', '#daa'),
    'blue': ('#006fc4', '#aad'),
    'green': ('#009e00', '#ada'),
    'purple': ('#800080', '#dad'),
    'orange': ('#ff7700', '#ffb57d'),
}
SYSTEM_INDICATOR_COLOR = 'red'
SYSTEM_INDICATOR_EXCLUSIONS = []

To exclude paths, include regex in SYSTEM_INDICATOR_EXCLUSIONS::

import re

SYSTEM_INDICATOR_EXCLUSIONS = [
    re.compile('^/[^/]+/admin/.*$'),
]

Example of a localhost indicator in admin;

system indicator admin example

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-sys-indicator-1.0.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_sys_indicator-1.0.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file django-sys-indicator-1.0.0.tar.gz.

File metadata

  • Download URL: django-sys-indicator-1.0.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for django-sys-indicator-1.0.0.tar.gz
Algorithm Hash digest
SHA256 634ee6ad289b81b3b133a93fa980e862d404ee01543da5756ea03ed721098487
MD5 9a38a8930b5f7530d613c03f41f3fbfa
BLAKE2b-256 a3b084a7d9c5a664c429100834ecc44244cb94b32a9c1f206d74ad34772b6481

See more details on using hashes here.

File details

Details for the file django_sys_indicator-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: django_sys_indicator-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for django_sys_indicator-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d36a9d142446710ee2d97f47f511cdd46470f9ccb495b9c273055a3296413c3c
MD5 6fad5bf2eb76e6801898548834a8df62
BLAKE2b-256 94b0b2246395316389612200150b165bba0ee0f84c3561286cd47177e1578023

See more details on using hashes here.

Supported by

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