{
"info": {
"author": "Praekelt Consulting",
"author_email": "dev@praekelt.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 5 - Production/Stable",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content"
],
"description": "Django Preferences\n==================\n**Django app allowing users to set app specific preferences through the admin interface.**\n\nProvides singleton admin views for Preferences objects and a simple interface to preference values.\nSingleton views ensure only one preference intance per site is available for each ``Preferences`` class.\n\n.. note::\n\n django-new-preferences requires and supports `Django's \"sites\" framework `_, which means you can have multiple preferences, each associated with a particular site.\n\n.. note::\n\n django-new-preferences version 0.0.5 and higher requires Django 1.3 and higher for correct operation. If you are getting the super vague ``Error: cannot import name receiver`` error on startup either update to Django 1.3 or use django-new-preferences version 0.0.4 or earlier.\n\n.. contents:: Contents\n :depth: 5\n\nInstallation\n------------\n\n#. Install or add ``django-new-preferences`` to your Python path.\n\n#. Add ``preferences`` to your ``INSTALLED APPS`` setting.\n\n#. Add ``django.contrib.sites`` to your ``INSTALLED APPS`` setting. django-new-preferences associates preferences to specific sites and thus requires Django's \"sites\" framework to be installed.\n\n#. Optionally, add ``preferences.context_processors.preferences_cp`` to your template context processors settings. This will automatically add a ``preferences`` variable to your template context::\n\n TEMPLATE_CONTEXT_PROCESSORS = (\n ...other context processors...,\n \"preferences.context_processors.preferences_cp\",\n )\n\nUsage\n-----\nTo create preferences for your app create a Django ORM model as usual, with the model inheriting from ``preferences.models.Preferences``. Also specify ``preferences.models`` as your model's module::\n\n from django.db import models\n from preferences.models import Preferences\n\n class MyPreferences(Preferences):\n portal_contact_email = models.EmailField()\n\nAdmin classes are specified as per usual, except that they have to inherit from or be registered with ``preferences.admin.PreferencesAdmin``, i.e.::\n\n from django.contrib import admin\n\n from preferences.admin import PreferencesAdmin\n from .models import MyPreferences\n\n admin.site.register(MyPreferences, PreferencesAdmin)\n\nWhen your model is registered with admin it will show up under the *Preferences* app label in Django admin.\n\nPreferences can be accessed in Python by importing the ``preferences`` module and traversing to your required preference in the form ``preferences..``, i.e.::\n\n from preferences import preferences\n\n portal_contact_email = preferences.MyPreferences.portal_contact_email\n\nIf you've specified the ``preferences.context_processors.preferences_cp`` as a `TEMPLATE_CONTEXT_PROCESSORS `_ you can similarly access your preferences within templates through the ``preferences`` variable, i.e.::\n\n {{ preferences.MyPreferences.portal_contact_email }}\n\nAuthors\n=======\n\nPraekelt Consulting\n-------------------\n* Shaun Sephton\n* Euan Jonker\n* Hedley Roos\n\nChangelog\n=========\n\nnext\n----\n#. Django 2 and Python 3.5 compatibility. Django 1.9 is no longer supported.\n\n0.2\n---\n#. Move to tox for tests.\n#. Django 1.9 to 1.11 support. The official minimum supported version is 1.9.\n\n0.1\n---\n#. Cleanup and fixing of tests courtesy of senyor.\n#. Rewrite distinct query so it works with Oracle backend.\n\n0.0.6\n-----\n#. Better packaging.\n\n0.0.5 (2011-08-17)\n------------------\n#. Added sites support.\n#. Added unittests.\n\n0.0.4 (2011-08-11)\n------------------\n#. Cleanup. Docs polish.\n\n0.0.3\n-----\n#. Spelling correction, thanks tiktuk.\n\n0.0.2\n-----\n#. Doc update to indicate importance of placing url include before admin url include.\n\n0.0.1\n-----\n#. First super alpha release.\n\n\n\n",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "http://github.com/praekelt/django-new-preferences",
"keywords": "",
"license": "BSD",
"maintainer": "",
"maintainer_email": "",
"name": "django-new-preferences",
"package_url": "https://pypi.org/project/django-new-preferences/",
"platform": "",
"project_url": "https://pypi.org/project/django-new-preferences/",
"project_urls": {
"Homepage": "http://github.com/praekelt/django-new-preferences"
},
"release_url": "https://pypi.org/project/django-new-preferences/0.2/",
"requires_dist": [
"django"
],
"requires_python": "",
"summary": "Django app allowing users to set app specific preferences through the admin interface.",
"version": "0.2"
},
"last_serial": 4233650,
"releases": {
"0.2": [
{
"comment_text": "",
"digests": {
"md5": "c3059e22b3c4032191bad2fc9b812b0e",
"sha256": "a2a04ac9370e0c7c23f08889a6b61d578ff5dc075c404e7c7905b2a6105da5ac"
},
"downloads": -1,
"filename": "django_new_preferences-0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c3059e22b3c4032191bad2fc9b812b0e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 13002,
"upload_time": "2018-09-03T08:20:28",
"url": "https://files.pythonhosted.org/packages/1c/f4/bf4740cdd5a91d4a47010de5bd992ea59336be925485c458fdcebc43a3d0/django_new_preferences-0.2-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "29bf9bc24b8651f593d63f65a6200a83",
"sha256": "146145700a2226fdeaf9efa6677ebf43a95bf30d569b452e6c1514ba36764bce"
},
"downloads": -1,
"filename": "django-new-preferences-0.2.tar.gz",
"has_sig": false,
"md5_digest": "29bf9bc24b8651f593d63f65a6200a83",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10238,
"upload_time": "2018-09-03T08:20:29",
"url": "https://files.pythonhosted.org/packages/6a/5c/4d4ddd080ee49464cf840a80491e35b8da3209f20967a2ae9f778e8ec78e/django-new-preferences-0.2.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "c3059e22b3c4032191bad2fc9b812b0e",
"sha256": "a2a04ac9370e0c7c23f08889a6b61d578ff5dc075c404e7c7905b2a6105da5ac"
},
"downloads": -1,
"filename": "django_new_preferences-0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c3059e22b3c4032191bad2fc9b812b0e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 13002,
"upload_time": "2018-09-03T08:20:28",
"url": "https://files.pythonhosted.org/packages/1c/f4/bf4740cdd5a91d4a47010de5bd992ea59336be925485c458fdcebc43a3d0/django_new_preferences-0.2-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "29bf9bc24b8651f593d63f65a6200a83",
"sha256": "146145700a2226fdeaf9efa6677ebf43a95bf30d569b452e6c1514ba36764bce"
},
"downloads": -1,
"filename": "django-new-preferences-0.2.tar.gz",
"has_sig": false,
"md5_digest": "29bf9bc24b8651f593d63f65a6200a83",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10238,
"upload_time": "2018-09-03T08:20:29",
"url": "https://files.pythonhosted.org/packages/6a/5c/4d4ddd080ee49464cf840a80491e35b8da3209f20967a2ae9f778e8ec78e/django-new-preferences-0.2.tar.gz"
}
]
}