{"id":15664005,"url":"https://github.com/idlesign/django-siteprefs","last_synced_at":"2025-05-05T23:17:33.542Z","repository":{"id":9937473,"uuid":"11953042","full_name":"idlesign/django-siteprefs","owner":"idlesign","description":"Reusable app for Django introducing site preferences system","archived":false,"fork":false,"pushed_at":"2022-02-04T12:45:15.000Z","size":133,"stargazers_count":17,"open_issues_count":11,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-05T23:17:26.689Z","etag":null,"topics":["django","preferences","python"],"latest_commit_sha":null,"homepage":"https://github.com/idlesign/django-siteprefs","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idlesign.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-07T15:14:54.000Z","updated_at":"2023-04-19T11:08:31.000Z","dependencies_parsed_at":"2022-09-10T12:50:43.636Z","dependency_job_id":null,"html_url":"https://github.com/idlesign/django-siteprefs","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idlesign%2Fdjango-siteprefs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idlesign%2Fdjango-siteprefs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idlesign%2Fdjango-siteprefs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idlesign%2Fdjango-siteprefs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idlesign","download_url":"https://codeload.github.com/idlesign/django-siteprefs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252590635,"owners_count":21772941,"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":["django","preferences","python"],"created_at":"2024-10-03T13:40:52.572Z","updated_at":"2025-05-05T23:17:33.527Z","avatar_url":"https://github.com/idlesign.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"django-siteprefs\n================\nhttp://github.com/idlesign/django-siteprefs\n\n.. image:: https://img.shields.io/pypi/v/django-siteprefs.svg\n    :target: https://pypi.python.org/pypi/django-siteprefs\n\n.. image:: https://img.shields.io/pypi/l/django-siteprefs.svg\n    :target: https://pypi.python.org/pypi/django-siteprefs\n\n.. image:: https://img.shields.io/coveralls/idlesign/django-siteprefs/master.svg\n    :target: https://coveralls.io/r/idlesign/django-siteprefs\n\n\nWhat's that\n-----------\n\n*django-siteprefs allows Django applications settings to come alive*\n\nLet's suppose you have your pretty settings.py file with you application:\n\n.. code-block:: python\n\n    from django.conf import settings\n\n    MY_OPTION_1 = getattr(settings, 'MY_APP_MY_OPTION_1', True)\n    MY_OPTION_2 = getattr(settings, 'MY_APP_MY_OPTION_2', 'Some value')\n    MY_OPTION_42 = getattr(settings, 'MY_APP_MY_OPTION_42', 42)\n\n\nNow you want these options to be exposed to Django Admin interface. Just add the following:\n\n.. code-block:: python\n\n    # To be sure our app is still functional without django-siteprefs.\n    if 'siteprefs' in settings.INSTALLED_APPS:\n\n        from siteprefs.toolbox import preferences\n\n        with preferences() as prefs:\n            # And that's how we expose our options to Admin.\n            prefs(MY_OPTION_1, MY_OPTION_2, MY_OPTION_42)\n\n\nAfter that you can view your settings in Django Admin.\n\nIf you want those settings to be editable through the Admin - ``siteprefs`` allows that too, and even more.\n\nRead the docs ;)\n\n\nDocumentation\n-------------\n\nhttp://django-siteprefs.readthedocs.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidlesign%2Fdjango-siteprefs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidlesign%2Fdjango-siteprefs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidlesign%2Fdjango-siteprefs/lists"}