Skip to main content

A system/environment indicator for django.

Project description

pre-commit.ci status https://img.shields.io/github/license/marksweb/django-sys-indicator https://img.shields.io/github/issues/marksweb/django-sys-indicator

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 your 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-2.2.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

django_sys_indicator-2.2.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file django_sys_indicator-2.2.0.tar.gz.

File metadata

  • Download URL: django_sys_indicator-2.2.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for django_sys_indicator-2.2.0.tar.gz
Algorithm Hash digest
SHA256 551b0b5e1871d5dca84d2d63ed15a9de87fbb9f89aaf5341b43dd5ede7c4addd
MD5 ee62ca9d6643ec676d187f1e96459b6e
BLAKE2b-256 b7670f8690da9ff43da773dec6160ead5c9b330e15c18fd6aadb92036e1480a3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_sys_indicator-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c46237181985ecec63b2d16fbc3bb05c4ee265ffb6c3c8176f91d5164181fc2a
MD5 5ee2b5176c59bd1f833fd676eaf8a19d
BLAKE2b-256 556e29687e5f1ddaef0844d6ed9c28218d858e826ad7cc404fd17c1f21041eb0

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