{"id":20037730,"url":"https://github.com/openedx/django-config-models","last_synced_at":"2025-04-04T18:05:53.232Z","repository":{"id":36979753,"uuid":"70177826","full_name":"openedx/django-config-models","owner":"openedx","description":"Configuration models for Django allowing config management with auditing.","archived":false,"fork":false,"pushed_at":"2025-03-24T11:41:34.000Z","size":572,"stargazers_count":24,"open_issues_count":4,"forks_count":16,"subscribers_count":68,"default_branch":"master","last_synced_at":"2025-03-28T17:06:52.498Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openedx.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-06T17:42:39.000Z","updated_at":"2025-03-24T11:41:36.000Z","dependencies_parsed_at":"2023-11-28T12:28:51.009Z","dependency_job_id":"2343fc99-a625-4972-8c9f-b58a061d85d6","html_url":"https://github.com/openedx/django-config-models","commit_stats":{"total_commits":261,"total_committers":31,"mean_commits":8.419354838709678,"dds":0.5900383141762452,"last_synced_commit":"09197742e2c400137b6ccfb10c68e0d8e4edfe47"},"previous_names":["edx/django-config-models"],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openedx%2Fdjango-config-models","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openedx%2Fdjango-config-models/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openedx%2Fdjango-config-models/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openedx%2Fdjango-config-models/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openedx","download_url":"https://codeload.github.com/openedx/django-config-models/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226213,"owners_count":20904465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-13T10:21:25.616Z","updated_at":"2025-04-04T18:05:53.185Z","avatar_url":"https://github.com/openedx.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"django-config-models\n********************\n\n|CI|_ |Codecov|_ |pypi-badge| |doc-badge| |pyversions-badge| |license-badge| |status-badge|\n===========================================================================================\n\n.. |CI| image:: https://github.com/openedx/django-config-models/workflows/Python%20CI/badge.svg?branch=master\n.. _CI: https://github.com/openedx/django-config-models/actions?query=workflow%3A%22Python+CI%22\n\n.. |Codecov| image:: http://codecov.io/github/openedx/django-config-models/coverage.svg?branch=master\n.. _Codecov: http://codecov.io/github/openedx/django-config-models?branch=master\n\n.. |pypi-badge| image:: https://img.shields.io/pypi/v/django-config-models.svg\n    :target: https://pypi.python.org/pypi/django-config-models/\n    :alt: PyPI\n\n.. |doc-badge| image:: https://readthedocs.org/projects/django-config-models/badge/?version=latest\n    :target: http://django-config-models.readthedocs.io/en/latest/\n    :alt: Documentation\n\n.. |pyversions-badge| image:: https://img.shields.io/pypi/pyversions/django-config-models.svg\n    :target: https://pypi.python.org/pypi/django-config-models/\n    :alt: Supported Python versions\n\n.. |license-badge| image:: https://img.shields.io/github/license/edx/django-config-models.svg\n    :target: https://github.com/openedx/django-config-models/blob/master/LICENSE.txt\n    :alt: License\n\n.. |status-badge| image:: https://img.shields.io/badge/Status-Maintained-brightgreen\n    :alt: Maintenance status\n\n\nPurpose\n-------\n\nThis app allows other apps to easily define a configuration model\nthat can be hooked into the admin site to allow configuration management\nwith auditing.\n\nGetting Started\n---------------\n\nAdd ``config_models`` to your ``INSTALLED_APPS`` list.\n\nUsage\n-----\n\nCreate a subclass of ``ConfigurationModel``, with fields for each\nvalue that needs to be configured::\n\n    class MyConfiguration(ConfigurationModel):\n        frobble_timeout = IntField(default=10)\n        frazzle_target = TextField(defalut=\"debug\")\n\nThis is a normal django model, so it must be synced and migrated as usual.\n\nThe default values for the fields in the ``ConfigurationModel`` will be\nused if no configuration has yet been created.\n\nRegister that class with the Admin site, using the ``ConfigurationAdminModel``::\n\n    from django.contrib import admin\n\n    from config_models.admin import ConfigurationModelAdmin\n\n    admin.site.register(MyConfiguration, ConfigurationModelAdmin)\n\nUse the configuration in your code::\n\n    def my_view(self, request):\n        config = MyConfiguration.current()\n        fire_the_missiles(config.frazzle_target, timeout=config.frobble_timeout)\n\nUse the admin site to add new configuration entries. The most recently created\nentry is considered to be ``current``.\n\nConfiguration\n-------------\n\nThe current ``ConfigurationModel`` will be cached in the ``configuration`` django cache,\nor in the ``default`` cache if ``configuration`` doesn't exist. The ``configuration`` and ``default`` caches\nare specified in the django ``CACHES`` setting. The caching can be per-process, per-machine, per-cluster, or\nsome other strategy, depending on the cache configuration.\n\nYou can specify the cache timeout in each ``ConfigurationModel`` by setting the ``cache_timeout`` property.\n\nYou can change the name of the cache key used by the ``ConfigurationModel`` by overriding\nthe ``cache_key_name`` function.\n\nExtension\n---------\n\n``ConfigurationModels`` are just django models, so they can be extended with new fields\nand migrated as usual. Newly added fields must have default values and should be nullable,\nso that rollbacks to old versions of configuration work correctly.\n\nDocumentation\n-------------\n\nThe full documentation is at https://django-config-models.readthedocs.org.\n\nLicense\n-------\n\nThe code in this repository is licensed under the AGPL 3.0 unless\notherwise noted.\n\nPlease see ``LICENSE.txt`` for details.\n\nGetting Help\n------------\n\nIf you're having trouble, we have discussion forums at\n`discuss.openedx.org \u003chttps://discuss.openedx.org\u003e`_ where you can connect with others in the\ncommunity.\n\nOur real-time conversations are on Slack. You can request a `Slack\ninvitation`_, then join our `community Slack workspace`_.\n\nFor anything non-trivial, the best path is to `open an issue`__ in this\nrepository with as many details about the issue you are facing as you\ncan provide.\n\n__ https://github.com/openedx/django-config-models /issues\n\nFor more information about these options, see the `Getting Help`_ page.\n\n.. _Slack invitation: https://openedx.org/slack\n.. _community Slack workspace: https://openedx.slack.com/\n.. _Getting Help: https://openedx.org/getting-help\n\nHow To Contribute\n-----------------\n\nContributions are very welcome.\n\nPlease read `How To Contribute \u003chttps://github.com/openedx/.github/blob/master/CONTRIBUTING.md\u003e`_ for details.\n\n\nThis project is currently accepting all types of contributions, bug fixes, security fixes, maintenance work, or new features. However, please make sure to have a discussion about your new feature idea with the maintainers prior to beginning development to maximize the chances of your change being accepted. You can start a conversation by creating a new issue on this repo summarizing your idea.\n\nOpen edX Code of Conduct\n------------------------\nAll community members are expected to follow the `Open edX Code of Conduct`_.\n\n.. _Open edX Code of Conduct: https://openedx.org/code-of-conduct/\n\nPeople\n------\nThe assigned maintainers for this component and other project details may be\nfound in `Backstage`_. Backstage pulls this data from the ``catalog-info.yaml``\nfile in this repo.\n\n.. _Backstage: https://backstage.openedx.org/catalog/default/component/django-config-models\n\nReporting Security Issues\n-------------------------\n\nPlease do not report security issues in public. Please email security@openedx.org.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenedx%2Fdjango-config-models","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenedx%2Fdjango-config-models","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenedx%2Fdjango-config-models/lists"}