django-sys-indicator


Namedjango-sys-indicator JSON
Version 2.1.0 PyPI version JSON
download
home_pagehttps://github.com/marksweb/django-sys-indicator
SummaryA system/environment indicator for django
upload_time2023-06-30 12:58:45
maintainer
docs_urlNone
authorMark Walker
requires_python>=3.8
licenseMIT License
keywords django
VCS
bugtrack_url
requirements build cfgv click coverage distlib filelock identify iniconfig nodeenv packaging pip-tools platformdirs pluggy pre-commit pyproject-hooks pytest pytest-cov pytest-django pyyaml virtualenv wheel
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # django-sys-indicator

[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/marksweb/django-sys-indicator/main.svg)](https://results.pre-commit.ci/latest/github/marksweb/django-sys-indicator/main)
[![GitHub license](https://img.shields.io/github/license/marksweb/django-sys-indicator)](https://github.com/marksweb/django-sys-indicator/blob/main/LICENSE)
[![GitHub issues](https://img.shields.io/github/issues/marksweb/django-sys-indicator)](https://github.com/marksweb/django-sys-indicator/issues)


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

![system indicator examples](https://django-sys-indicator.s3.eu-west-2.amazonaws.com/screenshots/django-sys-indicator.jpg "Django system indicator")

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

```python
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``::

```python
import re

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

Example of a localhost indicator in admin;

![system indicator admin example](https://django-sys-indicator.s3.eu-west-2.amazonaws.com/screenshots/indicator-admin-header.png "Django system indicator")

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/marksweb/django-sys-indicator",
    "name": "django-sys-indicator",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "Django",
    "author": "Mark Walker",
    "author_email": "theshow@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d3/aa/887ed189dd430bc65382addfb95499b350d2a9f61bae5c4277a408d51305/django-sys-indicator-2.1.0.tar.gz",
    "platform": null,
    "description": "# django-sys-indicator\n\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/marksweb/django-sys-indicator/main.svg)](https://results.pre-commit.ci/latest/github/marksweb/django-sys-indicator/main)\n[![GitHub license](https://img.shields.io/github/license/marksweb/django-sys-indicator)](https://github.com/marksweb/django-sys-indicator/blob/main/LICENSE)\n[![GitHub issues](https://img.shields.io/github/issues/marksweb/django-sys-indicator)](https://github.com/marksweb/django-sys-indicator/issues)\n\n\nA visual indicator of what environment/system you're using in django.\n\n![system indicator examples](https://django-sys-indicator.s3.eu-west-2.amazonaws.com/screenshots/django-sys-indicator.jpg \"Django system indicator\")\n\nTo install:\n\n* Add ``'django_sys_indicator.apps.DjangoSysIndicatorConfig'`` to your `INSTALLED_APPS`\n* Add ``'django_sys_indicator.middleware.SystemIndicatorMiddleware'`` to you `MIDDLEWARE`\n\n\nConfiguration settings and their defaults\n\n```python\nSYSTEM_INDICATOR_ENABLED = False\nSYSTEM_INDICATOR_LABEL = 'localhost'\nSYSTEM_INDICATOR_COLORS = {\n    # Format here is colour, border colour\n    'red': ('#c50000', '#daa'),\n    'blue': ('#006fc4', '#aad'),\n    'green': ('#009e00', '#ada'),\n    'purple': ('#800080', '#dad'),\n    'orange': ('#ff7700', '#ffb57d'),\n}\nSYSTEM_INDICATOR_COLOR = 'red'\nSYSTEM_INDICATOR_EXCLUSIONS = []\n```\n\nTo exclude paths, include regex in ``SYSTEM_INDICATOR_EXCLUSIONS``::\n\n```python\nimport re\n\nSYSTEM_INDICATOR_EXCLUSIONS = [\n    re.compile('^/[^/]+/admin/.*$'),\n]\n```\n\nExample of a localhost indicator in admin;\n\n![system indicator admin example](https://django-sys-indicator.s3.eu-west-2.amazonaws.com/screenshots/indicator-admin-header.png \"Django system indicator\")\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "A system/environment indicator for django",
    "version": "2.1.0",
    "project_urls": {
        "Homepage": "https://github.com/marksweb/django-sys-indicator"
    },
    "split_keywords": [
        "django"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a62d1f0d10b1ce6ac0b2a20cc33b2678ad8ab80a2cfdc003a652f5c47dc846a6",
                "md5": "89e3c00be680b670ce3129108f2b6e47",
                "sha256": "e5f1fa96b88a01f553bf1702c945f127ace2187a1ea4913b453f4897aece6e2a"
            },
            "downloads": -1,
            "filename": "django_sys_indicator-2.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "89e3c00be680b670ce3129108f2b6e47",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6040,
            "upload_time": "2023-06-30T12:58:44",
            "upload_time_iso_8601": "2023-06-30T12:58:44.306604Z",
            "url": "https://files.pythonhosted.org/packages/a6/2d/1f0d10b1ce6ac0b2a20cc33b2678ad8ab80a2cfdc003a652f5c47dc846a6/django_sys_indicator-2.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d3aa887ed189dd430bc65382addfb95499b350d2a9f61bae5c4277a408d51305",
                "md5": "5e26099002b94fef47c3600c9732cf8b",
                "sha256": "f1298b4ca382451fd4bc45390a491100bc0f52177ce77cad51fd150ed7801517"
            },
            "downloads": -1,
            "filename": "django-sys-indicator-2.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "5e26099002b94fef47c3600c9732cf8b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 5845,
            "upload_time": "2023-06-30T12:58:45",
            "upload_time_iso_8601": "2023-06-30T12:58:45.518913Z",
            "url": "https://files.pythonhosted.org/packages/d3/aa/887ed189dd430bc65382addfb95499b350d2a9f61bae5c4277a408d51305/django-sys-indicator-2.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-30 12:58:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "marksweb",
    "github_project": "django-sys-indicator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "build",
            "specs": [
                [
                    "==",
                    "0.10.0"
                ]
            ]
        },
        {
            "name": "cfgv",
            "specs": [
                [
                    "==",
                    "3.3.1"
                ]
            ]
        },
        {
            "name": "click",
            "specs": [
                [
                    "==",
                    "8.1.3"
                ]
            ]
        },
        {
            "name": "coverage",
            "specs": [
                [
                    "==",
                    "7.2.7"
                ]
            ]
        },
        {
            "name": "distlib",
            "specs": [
                [
                    "==",
                    "0.3.6"
                ]
            ]
        },
        {
            "name": "filelock",
            "specs": [
                [
                    "==",
                    "3.12.2"
                ]
            ]
        },
        {
            "name": "identify",
            "specs": [
                [
                    "==",
                    "2.5.24"
                ]
            ]
        },
        {
            "name": "iniconfig",
            "specs": [
                [
                    "==",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "nodeenv",
            "specs": [
                [
                    "==",
                    "1.8.0"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    "==",
                    "23.1"
                ]
            ]
        },
        {
            "name": "pip-tools",
            "specs": [
                [
                    "==",
                    "6.13.0"
                ]
            ]
        },
        {
            "name": "platformdirs",
            "specs": [
                [
                    "==",
                    "3.8.0"
                ]
            ]
        },
        {
            "name": "pluggy",
            "specs": [
                [
                    "==",
                    "1.2.0"
                ]
            ]
        },
        {
            "name": "pre-commit",
            "specs": [
                [
                    "==",
                    "3.3.3"
                ]
            ]
        },
        {
            "name": "pyproject-hooks",
            "specs": [
                [
                    "==",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    "==",
                    "7.4.0"
                ]
            ]
        },
        {
            "name": "pytest-cov",
            "specs": [
                [
                    "==",
                    "4.1.0"
                ]
            ]
        },
        {
            "name": "pytest-django",
            "specs": [
                [
                    "==",
                    "4.5.2"
                ]
            ]
        },
        {
            "name": "pyyaml",
            "specs": [
                [
                    "==",
                    "6.0"
                ]
            ]
        },
        {
            "name": "virtualenv",
            "specs": [
                [
                    "==",
                    "20.23.1"
                ]
            ]
        },
        {
            "name": "wheel",
            "specs": [
                [
                    "==",
                    "0.40.0"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "django-sys-indicator"
}
        
Elapsed time: 0.08121s