{"id":38686338,"url":"https://github.com/teapow/django-envi","last_synced_at":"2026-01-17T10:24:12.032Z","repository":{"id":57419928,"uuid":"100516328","full_name":"teapow/django-envi","owner":"teapow","description":"Environment-specific visual indicators.","archived":false,"fork":false,"pushed_at":"2021-04-26T22:15:25.000Z","size":155,"stargazers_count":1,"open_issues_count":2,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-30T13:08:22.867Z","etag":null,"topics":["deployment","django","django-envi","environments","middleware","settings"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teapow.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-16T17:42:18.000Z","updated_at":"2019-09-15T15:28:31.000Z","dependencies_parsed_at":"2022-09-01T03:50:37.027Z","dependency_job_id":null,"html_url":"https://github.com/teapow/django-envi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/teapow/django-envi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teapow%2Fdjango-envi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teapow%2Fdjango-envi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teapow%2Fdjango-envi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teapow%2Fdjango-envi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teapow","download_url":"https://codeload.github.com/teapow/django-envi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teapow%2Fdjango-envi/sbom","scorecard":{"id":871695,"data":{"date":"2025-08-11","repo":{"name":"github.com/teapow/django-envi","commit":"77f241fd511af510c181cd6b3941447a2065c05c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 2/22 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T04:27:01.699Z","repository_id":57419928,"created_at":"2025-08-24T04:27:01.699Z","updated_at":"2025-08-24T04:27:01.699Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28506410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deployment","django","django-envi","environments","middleware","settings"],"created_at":"2026-01-17T10:24:11.935Z","updated_at":"2026-01-17T10:24:12.012Z","avatar_url":"https://github.com/teapow.png","language":"Python","readme":"===========\ndjango-envi\n===========\n\n|travis| |codacy| |coverage| |pypi|\n\n.. |travis| image:: https://travis-ci.org/teapow/django-envi.svg?branch=master\n   :target: https://travis-ci.org/teapow/django-envi\n\n.. |codacy| image:: https://api.codacy.com/project/badge/Grade/d1503b14ca7c4d96bcd0141ffbbb2d26    \n   :target: https://www.codacy.com/app/teapow/django-envi\n   \n.. |coverage| image:: https://api.codacy.com/project/badge/Coverage/d1503b14ca7c4d96bcd0141ffbbb2d26\n   :target: https://www.codacy.com/app/teapow/django-envi\n\n.. |pypi| image:: https://badge.fury.io/py/django-envi.svg\n    :target: https://badge.fury.io/py/django-envi\n\n.. contents:: Navigation\n\n\nIntroduction\n============\n\nLightweight set of middleware classes that inject visual indicators for\neach type of environment that a project is deployed to. Inspired by\n`this article`_.\n\n.. _this article: https://goo.gl/7cLsOH\n\n.. image:: https://i.imgur.com/flSPk7w.png\n\n\nQuickstart\n==========\n\n1. Install the package: ``pip install django-envi``.\n2. Add the ``'envi'`` app to your ``INSTALLED_APPS``.\n3. Install the desired middleware class to ``MIDDLEWARE_CLASSES``:\n\n   * ``envi.middleware.EnviFooterMiddleware`` injects a sticky footer to\n     all pages that displays the current environment.\n\n4. In each environment's settings file, add the ``ENVI_ENVIRONMENT_KEY`` \n   setting, with the corresponding environment key string. See below.\n\n\nBuilt-in environments\n=====================\n\nThere are a number of built-in environment definitions:\n\n* ``'local'``: A striped grey banner. Appears site-wide (default).\n\n* ``'dev'``: A striped blue banner. Appears site-wide.\n\n* ``'staging'``: A striped yellow banner. Appears site-wide.\n\n* ``'production'``: A striped red banner. Only appears in ``/admin``.\n\n\nConfiguration\n=============\n\nThe following settings are supported in your ``settings.py``:\n\n* ``ENVI_ENVIRONMENT_KEY``: A string representing the key to use to search\n  the ``ENVI_ENVIRONMENTS`` settings dictionary. Defaults to ``'local'``.\n\n* ``ENVI_ENVIRONMENTS``: A dictionary containing key-value pairs consisting\n  of environment keys (as strings) mapped to dictionaries representing an\n  environment definition. By default, there are 4 `built-in environments`_\n  available for selection.\n\n* ``ENVI_ENVIRONMENT``: The current environment. This can either be defined\n  explicitly (see `Creating environments`_), otherwise it will be set to the\n  corresponding dictionary by looking up the ``ENVI_ENVIRONMENT_KEY`` within\n  the ``ENVI_ENVIRONMENTS`` dictionary.\n\nCreating environments\n=====================\n\nEnvironments can be created using the following dictionary structure:\n\n.. code-block:: python\n\n  CUSTOM_ENV = {\n      # Required for all subclasses of EnviBaseMiddleware.\n      \"SHOW_IN_ADMIN\": True,\n      \"SHOW_IN_SITE\": True,\n\n      # Only required for subclasses of EnviBaseTemplateMiddleware.\n      \"CONTEXT\": {\n          # The contents of this dictionary will be passed to the template\n          # being rendered. You can add anything you want here.\n          \"CONTENT\": \"ENVIRONMENT: STAGING\",\n          \"COLOR_A\": \"#ffba1e\",\n          \"COLOR_B\": \"#dba11a\",\n      },\n  }\n\nThen, this environment definition can be either:\n\n* Added to the ``ENVI_ENVIRONMENTS`` dictionary, and activated by setting\n  the ``ENVI_ENVIRONMENT_KEY`` to the respective key.\n\n  .. code-block:: python\n\n    ENVI_ENVIRONMENTS = {\n        \"custom_key_1\": CUSTOM_ENV,\n        \"custom_key_2\": OTHER_CUSTOM_ENV,\n    }\n\n    ENVI_ENVIRONMENT_KEY = \"custom_key_1\"\n\n* Used to set the ``ENVI_ENVIRONMENT`` value directly.\n\n  .. code-block:: python\n\n    ENVI_ENVIRONMENT = CUSTOM_ENV\n\n\nAdvanced usage\n==============\n\nThe implementation of ``django-envi`` makes it easy to customize.\n\n\nExtending via templates\n-----------------------\n\nTODO: How to.\n\n\nExtending via subclassing\n-------------------------\n\nTODO: How to.\n\n\nChangelog\n=========\n\n+----------------+-----------------------------------------------------------+\n| Version        | Description                                               |\n+================+===========================================================+\n| 0.2.1          | Bugfix to prevent adding the banner to AJAX requests.     |\n|                | Thanks to @marksweb for the PR. Also adds backwards       |\n|                | compatability for Django versions \u003c 1.10.                 |\n+----------------+-----------------------------------------------------------+\n| 0.2            | Repackaged without unnecessary docs/images directory. All |\n|                | documentation can be found in README.rst.                 |\n+----------------+-----------------------------------------------------------+\n| 0.1.2          | Fixes reference to nonexistent template. Manifest issue.  |\n+----------------+-----------------------------------------------------------+\n| 0.1.1          | Renamed to django-envi.                                   |\n+----------------+-----------------------------------------------------------+\n| 0.1            | Initial version.                                          |\n+----------------+-----------------------------------------------------------+\n\n\nLicense\n=======\n\nShared under the `MIT License`_.\n\n.. _MIT License: https://tomm.io/licenses/mit/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteapow%2Fdjango-envi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteapow%2Fdjango-envi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteapow%2Fdjango-envi/lists"}