{
"info": {
"author": "Zope Corporation and Contributors",
"author_email": "zope-dev@zope.org",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Zope3",
"Intended Audience :: Developers",
"License :: OSI Approved :: Zope Public License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Internet :: WWW/HTTP"
],
"description": "This package provides a UI to maintain hierarchical user preferences\nin the ZMI.\n\n.. contents::\n\n=====================\n zope.app.preference\n=====================\n\nThis package provides a user interface in the ZMI, so the user can edit\nthe preferences.\n\nSet up\n======\n\nTo show the user interface functions we need some setup beforehand:\n\n >>> from zope.testbrowser.wsgi import Browser\n >>> browser = Browser()\n >>> browser.handleErrors = False\n\nAs the preferences cannot be defined through the web we have to define\nthem in python code:\n\n >>> import zope.interface\n >>> import zope.schema\n >>> class IZMIUserSettings(zope.interface.Interface):\n ... \"\"\"Basic User Preferences\"\"\"\n ...\n ... email = zope.schema.TextLine(\n ... title=u\"E-mail Address\",\n ... description=u\"E-mail Address used to send notifications\")\n ...\n ... skin = zope.schema.Choice(\n ... title=u\"Skin\",\n ... description=u\"The skin that should be used for the ZMI.\",\n ... values=['Rotterdam', 'ZopeTop', 'Basic'],\n ... default='Rotterdam')\n ...\n ... showZopeLogo = zope.schema.Bool(\n ... title=u\"Show Zope Logo\",\n ... description=u\"Specifies whether Zope logo should be displayed \"\n ... u\"at the top of the screen.\",\n ... default=True)\n >>> class INotCategorySettings(zope.interface.Interface):\n ... \"\"\"An example that's not a categary\"\"\"\n ... comment = zope.schema.TextLine(\n ... title=u'A comment',\n ... description=u'A description')\n\nThe preference schema is usually registered using a ZCML statement:\n\n >>> from zope.configuration import xmlconfig\n >>> import zope.preference\n >>> context = xmlconfig.file('meta.zcml', zope.preference)\n\n >>> context = xmlconfig.string('''\n ... \n ...\n ... \n ...\n ... \n ...\n ... ''', context)\n\nEditing Preferences\n===================\n\nThe preferences are accessable in the ``++preferences++`` namespace:\n\n >>> browser.open('http://localhost/++preferences++')\n\nThe page shows a form which allows editing the preference values:\n\n >>> browser.getControl(\"comment\").value = \"A comment\"\n >>> browser.getControl('E-mail').value = 'hans@example.com'\n >>> browser.getControl('Skin').displayOptions\n ['Rotterdam', 'ZopeTop', 'Basic']\n >>> browser.getControl('Skin').displayValue = ['ZopeTop']\n >>> browser.getControl('Show Zope Logo').selected\n True\n >>> browser.getControl('Show Zope Logo').click()\n\nAfter selecting `Change` the values get persisted:\n\n >>> browser.getControl('Change').click()\n >>> browser.url\n 'http://localhost/++preferences++/@@index.html'\n >>> browser.getControl('E-mail').value\n 'hans@example.com'\n >>> browser.getControl('Skin').displayValue\n ['ZopeTop']\n >>> browser.getControl('Show Zope Logo').selected\n False\n\nThe preference group is shown in a tree. It has a link to the form:\n\n >>> browser.getLink('ZMISettings').click()\n >>> browser.url\n 'http://localhost/++preferences++/ZMISettings/@@index.html'\n >>> browser.getControl('E-mail').value\n 'hans@example.com'\n\n\nPreference Group Trees\n======================\n\nThe preferences would not be very powerful, if you could create a full\npreferences. So let's create a sub-group for our ZMI user settings, where we\ncan adjust the look and feel of the folder contents view:\n\n >>> class IFolderSettings(zope.interface.Interface):\n ... \"\"\"Basic Folder Settings\"\"\"\n ...\n ... shownFields = zope.schema.Set(\n ... title=u\"Shown Fields\",\n ... description=u\"Fields shown in the table.\",\n ... value_type=zope.schema.Choice(['name', 'size', 'creator']),\n ... default=set(['name', 'size']))\n ...\n ... sortedBy = zope.schema.Choice(\n ... title=u\"Sorted By\",\n ... description=u\"Data field to sort by.\",\n ... values=['name', 'size', 'creator'],\n ... default='name')\n\nAnd register it:\n\n >>> context = xmlconfig.string('''\n ... \n ...\n ... \n ...\n ... ''', context)\n\nThe sub-group is displayed inside the parent group as a form:\n\n >>> browser.reload()\n >>> browser.getControl('Shown Fields').displayOptions\n ['name', 'size', 'creator']\n >>> browser.getControl('Shown Fields').displayValue\n ['name', 'size']\n >>> browser.getControl('Shown Fields').displayValue = ['size', 'creator']\n >>> browser.getControl('Sorted By').displayOptions\n ['name', 'size', 'creator']\n >>> browser.getControl('Sorted By').displayValue = ['creator']\n\nSelecing `Change` persists these values, too:\n\n >>> browser.getControl('Change').click()\n >>> browser.getControl('Shown Fields').displayValue\n ['size', 'creator']\n >>> browser.getControl('Sorted By').displayValue\n ['creator']\n >>> browser.open(\"http://localhost/++preferences++/ZMISettings.Folder/@@index.html\")\n\n\n=========\n CHANGES\n=========\n\n4.0.0 (2017-05-17)\n==================\n\n- Add support for Python 3.4, 3.5, 3.6 and PyPy.\n\n- Removed test dependency on ``zope.app.zcmlfiles`` and\n ``zope.app.renderer``, among others. ``zope.app.renderer`` is still\n required at runtime.\n\n- Broke test dependency on ``zope.app.testing`` by using\n ``zope.app.wsgi.testlayer``.\n\n\n3.8.1 (2010-06-15)\n==================\n\n- Fixed BBB imports which pointed to a not existing `zope.preferences`\n package.\n\n\n3.8.0 (2010-06-12)\n==================\n\n- Depend on split out `zope.preference`.\n\n\n3.7.0 (2010-06-11)\n==================\n\n- Added HTML labels to ZMI forms.\n\n- Removed `edit.pt` as it seems to be unused.\n\n- Added tests for the ZMI views.\n\n\n3.6.0 (2009-02-01)\n==================\n\n- Use ``zope.container`` instead of ``zope.app.container``.\n\n\n3.5.0 (2009-01-17)\n==================\n\n- Got rid of ``zope.app.zapi`` dependency, replacing its uses with direct\n imports from original places.\n\n- Change mailing address from zope3-dev to zope-dev, as the first one\n is retired now.\n\n- Fix tests for python 2.6.\n\n- Remove zpkg stuff and zcml include files for\n old mkzopeinstance-based instances.\n\n\n3.4.1 (2007-10-30)\n==================\n\n- Avoid deprecation warnings for ``ZopeMessageFactory``.\n\n\n3.4.0 (2007-10-25)\n==================\n\n- Initial release independent of the main Zope tree.",
"description_content_type": null,
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "http://github.com/zopefoundation/zope.app.preference",
"keywords": "zope3 user preference",
"license": "ZPL 2.1",
"maintainer": "",
"maintainer_email": "",
"name": "zope.app.preference",
"package_url": "https://pypi.org/project/zope.app.preference/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/zope.app.preference/",
"project_urls": {
"Homepage": "http://github.com/zopefoundation/zope.app.preference"
},
"release_url": "https://pypi.org/project/zope.app.preference/4.0.0/",
"requires_dist": [
"setuptools",
"zope.app.form (>=5.0.0)",
"zope.app.tree (>=4.0.0)",
"zope.preference",
"docutils; extra == 'test'",
"webtest; extra == 'test'",
"zope.app.basicskin (>=4.0.0); extra == 'test'",
"zope.app.rotterdam (>=4.0.0); extra == 'test'",
"zope.app.security (>=4.0.0); extra == 'test'",
"zope.app.wsgi (>=4.1.0); extra == 'test'",
"zope.principalannotation; extra == 'test'",
"zope.principalregistry; extra == 'test'",
"zope.testbrowser (>=5.2); extra == 'test'",
"zope.testrunner; extra == 'test'"
],
"requires_python": "",
"summary": "User Preferences Framework ZMI UI",
"version": "4.0.0"
},
"last_serial": 2880268,
"releases": {
"3.4.0": [
{
"comment_text": "",
"digests": {
"md5": "7fe639d263fd3d0b6e50d8113acc7f2c",
"sha256": "a602232b8ea200283ceb5e29cb731f49d54e73700f510c10b973c7fd1dba1da5"
},
"downloads": -1,
"filename": "zope.app.preference-3.4.0.tar.gz",
"has_sig": false,
"md5_digest": "7fe639d263fd3d0b6e50d8113acc7f2c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 24397,
"upload_time": "2007-10-26T09:55:52",
"url": "https://files.pythonhosted.org/packages/ff/f4/333271a31e588291d70f14124cf3d0318b044adb04292e5e5029ef198818/zope.app.preference-3.4.0.tar.gz"
}
],
"3.4.0a1": [
{
"comment_text": "",
"digests": {
"md5": "cf3188ca098455c36d16f525308f0164",
"sha256": "c67095f950555180db6ea403c9d19c21ebcf1d0a412aaef086f715e220da08a7"
},
"downloads": -1,
"filename": "zope.app.preference-3.4.0a1.tar.gz",
"has_sig": false,
"md5_digest": "cf3188ca098455c36d16f525308f0164",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 15741,
"upload_time": "2007-04-23T13:32:00",
"url": "https://files.pythonhosted.org/packages/8f/5a/2e3ff8edc2f5b4709f38503058b30a822b0a05e8702076529b231ec07e43/zope.app.preference-3.4.0a1.tar.gz"
}
],
"3.4.1": [
{
"comment_text": "",
"digests": {
"md5": "18bfc1aa2c4dbd21c6eb805665d93f71",
"sha256": "385da0a23407628845ce32d4e114b2a0b3262ca9dde52dcbacebfbb4416928ed"
},
"downloads": -1,
"filename": "zope.app.preference-3.4.1.tar.gz",
"has_sig": false,
"md5_digest": "18bfc1aa2c4dbd21c6eb805665d93f71",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 24505,
"upload_time": "2007-10-30T18:47:52",
"url": "https://files.pythonhosted.org/packages/97/d8/040b2cf62cee567c2815fb41a8aa70492785467accb365c6f6a89ca70034/zope.app.preference-3.4.1.tar.gz"
}
],
"3.5.0": [
{
"comment_text": "",
"digests": {
"md5": "c66d5cb8f0f7faf57ed9c6d97837e108",
"sha256": "b66daf6d1bfe705b1fa4512682e8e05a7a74593a05d124b96d97becd89e5d8c4"
},
"downloads": -1,
"filename": "zope.app.preference-3.5.0.tar.gz",
"has_sig": false,
"md5_digest": "c66d5cb8f0f7faf57ed9c6d97837e108",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20545,
"upload_time": "2009-01-17T13:38:32",
"url": "https://files.pythonhosted.org/packages/4e/1d/0254aa5bdd0a2575a54bf2ac53eac3b4a8cee9a138beb297a29fd297cb32/zope.app.preference-3.5.0.tar.gz"
}
],
"3.6.0": [
{
"comment_text": "",
"digests": {
"md5": "14ca33e2e9a48f4e92d47eeaaffba20f",
"sha256": "477e0a51235e2c304df2efe662c8387b6bbedb627a74f8598886712564a353ef"
},
"downloads": -1,
"filename": "zope.app.preference-3.6.0.tar.gz",
"has_sig": false,
"md5_digest": "14ca33e2e9a48f4e92d47eeaaffba20f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 25537,
"upload_time": "2009-02-01T16:58:04",
"url": "https://files.pythonhosted.org/packages/e1/b8/eb53bb6a35a70a14cda3addc07ce19b25b44c234340bc3ad18e45c29d47c/zope.app.preference-3.6.0.tar.gz"
}
],
"3.7.0": [
{
"comment_text": "",
"digests": {
"md5": "acddba7429884eec6f0704561d853605",
"sha256": "b9869b64d93300e86de747ad03b05d07aa050406128d052c05de80ac6d0a2c59"
},
"downloads": -1,
"filename": "zope.app.preference-3.7.0.tar.gz",
"has_sig": false,
"md5_digest": "acddba7429884eec6f0704561d853605",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 23589,
"upload_time": "2010-06-11T19:24:13",
"url": "https://files.pythonhosted.org/packages/e9/49/cc7ac9e2777f146f06b09bc9bcd07a90566997ffdca1f790b57f693f95f8/zope.app.preference-3.7.0.tar.gz"
}
],
"3.8.0": [
{
"comment_text": "",
"digests": {
"md5": "5f593b9c0fe67fb9572896dd8faeb56c",
"sha256": "f4c32b86b7fe84601d2ed29b158002ef771d001e06e8c9b9285217822d4366a1"
},
"downloads": -1,
"filename": "zope.app.preference-3.8.0.tar.gz",
"has_sig": false,
"md5_digest": "5f593b9c0fe67fb9572896dd8faeb56c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10337,
"upload_time": "2010-06-12T13:48:31",
"url": "https://files.pythonhosted.org/packages/ba/64/80bd528d9592e548518e696725d5b6e689e956a4ea4595e49525f8793327/zope.app.preference-3.8.0.tar.gz"
}
],
"3.8.1": [
{
"comment_text": "",
"digests": {
"md5": "ab6906261854c61ff9f0a13c7612d3e8",
"sha256": "0a7d2f66d1a219a79bc2a9c7f66a76309ea11837c4ab96b280aeda06618e16ce"
},
"downloads": -1,
"filename": "zope.app.preference-3.8.1.tar.gz",
"has_sig": false,
"md5_digest": "ab6906261854c61ff9f0a13c7612d3e8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10417,
"upload_time": "2010-06-15T15:43:10",
"url": "https://files.pythonhosted.org/packages/f7/fe/e1dbd71eb7353fe705fa4f12df80f905c6a1604efab5caf7fe949c14d74f/zope.app.preference-3.8.1.tar.gz"
}
],
"4.0.0": [
{
"comment_text": "",
"digests": {
"md5": "ab9ba00d003249248d4c64d63b51c794",
"sha256": "49d301661f6df00870113e9f8640723aee84bc1b50ecd26562dffa949fddaf02"
},
"downloads": -1,
"filename": "zope.app.preference-4.0.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "ab9ba00d003249248d4c64d63b51c794",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 22060,
"upload_time": "2017-05-17T11:23:40",
"url": "https://files.pythonhosted.org/packages/10/b1/3107c1a2d664801adbd5ab58d4f0e10cdd152a4139e999bbab649d648e1f/zope.app.preference-4.0.0-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "6ed8fc3d5927826426a42d1d7b05c4d6",
"sha256": "ad06b50d4dbb764696fb7273469d4adf03c9e49e051b16b7e1f4bc0e96dded64"
},
"downloads": -1,
"filename": "zope.app.preference-4.0.0.tar.gz",
"has_sig": false,
"md5_digest": "6ed8fc3d5927826426a42d1d7b05c4d6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 15752,
"upload_time": "2017-05-17T11:23:42",
"url": "https://files.pythonhosted.org/packages/81/74/431928a9f2172534dffb1712bfa3d712fcf9d0419c8c696d9775c83c5db4/zope.app.preference-4.0.0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "ab9ba00d003249248d4c64d63b51c794",
"sha256": "49d301661f6df00870113e9f8640723aee84bc1b50ecd26562dffa949fddaf02"
},
"downloads": -1,
"filename": "zope.app.preference-4.0.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "ab9ba00d003249248d4c64d63b51c794",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 22060,
"upload_time": "2017-05-17T11:23:40",
"url": "https://files.pythonhosted.org/packages/10/b1/3107c1a2d664801adbd5ab58d4f0e10cdd152a4139e999bbab649d648e1f/zope.app.preference-4.0.0-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "6ed8fc3d5927826426a42d1d7b05c4d6",
"sha256": "ad06b50d4dbb764696fb7273469d4adf03c9e49e051b16b7e1f4bc0e96dded64"
},
"downloads": -1,
"filename": "zope.app.preference-4.0.0.tar.gz",
"has_sig": false,
"md5_digest": "6ed8fc3d5927826426a42d1d7b05c4d6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 15752,
"upload_time": "2017-05-17T11:23:42",
"url": "https://files.pythonhosted.org/packages/81/74/431928a9f2172534dffb1712bfa3d712fcf9d0419c8c696d9775c83c5db4/zope.app.preference-4.0.0.tar.gz"
}
]
}