{ "info": { "author": "Oshane Bailey", "author_email": "b4.oshany@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Pylons", "License :: Repoze Public License", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application" ], "description": "kotti_controlpanel\n*******************\n\nAdd a settings configuration to your Kotti site. |build status|_\n\n.. |build status| image:: https://img.shields.io/travis/b4oshany/kotti_controlpanel/production.svg?style=flat-square\n.. _build status: http://travis-ci.org/b4oshany/kotti_controlpanel\n\n`Find out more about Kotti`_\n\n\nYou have a full example e.g. in the addon kotti_google_analytics_.\n\nSetup\n=====\n\nTo activate the ``kotti_controlpanel`` add-on in your Kotti site, you need to\nadd an entry to the ``kotti.configurators`` setting in your Paste\nDeploy config. If you don't have a ``kotti.configurators`` option,\nadd one. The line in your ``[app:main]`` (or ``[app:kotti]``, depending on how\nyou setup Fanstatic) section could then look like this::\n\n kotti.configurators = kotti_controlpanel.kotti_configure\n\nThe add-on adds a new configuration page to save settings for your module or\nacross different modules. It adds a new submenupoint named \"Settings\" to the\nmenupoint \"Site Setup\". Every setting collection is presented in one tab. It\nis intended to use one tab for a module, but it is also possible to use\nmultiple tabs if you have the need for a more extended structure.\n\nYou can choose between two modes to set up your settings. With the \"dict mode\"\nyou have a very easy and straightforward option to set up the settings. If you\nneed more advanced forms you can set up an own schema.\n\nA setting tab is set up with with a dictionary. Here you define a name and a\ntitle for your tab, what are required. Optional arguments are success_message,\neither settings or schema, schema_factory and use_csrf_token.\n\nDefine your settings in a dictionary::\n\n TestSettings = {\n 'name': 'test_settings',\n 'title': \"Testsettings\",\n 'icon': 'myaddon:static/icon.png',\n 'description': \"Some description for my settings\",\n 'success_message': u\"Successfully saved test settings.\",\n 'settings': [\n {'type': 'String',\n 'name': 'testsetting_1',\n 'title': 'Test 1',\n 'description': 'a test setting',\n 'default': '', },\n {'type': 'Integer',\n 'name': 'testsetting_2',\n 'title': 'Test 2',\n 'description': 'again a test setting',\n 'default': 23, }]}\n\nDefine your settings with a schema::\n\n class StringSchemaNode(colander.SchemaNode):\n name = 'a_string'\n title = 'hello'\n default = 'hello world'\n\n class RangedIntSchemaNode(colander.SchemaNode):\n name = 'range_int'\n validator = colander.Range(0, 10)\n default = 5\n title = 'Ranged Int'\n\n class TestSchema(colander.MappingSchema):\n string = StringSchemaNode(colander.String())\n ranged_int = RangedIntSchemaNode(colander.Int())\n\n TestSettings = {\n 'name': 'test_settings',\n 'title': \"Testsettings\",\n 'description': \"Some description for my settings\",\n 'success_message': u\"Successfully saved test settings.\",\n 'schema_factory': TestSchema\n }\n\n\nTo get your configuration registered within ``kotti_controlpanel`` add the\nsettings in a populator in your add-on. Have a look to the Kotti documentation\nto get more informations for populators_ and to see an example_.\n\n\nAdd your settings configuration within a populator, e.g. in a file named populate.py::\n\n def populate():\n from kotti_controlpanel.util import add_settings\n add_settings(TestSettings)\n\nand add this to your configuration::\n\n def kotti_configure(settings):\n settings['kotti.populators'] += ' my_addon.populate.populate'\n\nor directly to your ini file::\n\n kotti.populators = my_addon.populate.populate\n\n\nTo get your setting back into your code you use the following::\n\n from kotti_controlpanel.util import get_setting\n\n first_test_setting = get_setting('test_setting_1')\n\n\nYou can also add useful links to the main Control panel view by::\n\n from kotti.util import Link\n from kotti_controlpanel import CONTROL_PANEL_LINKS\n\n def kotti_configure(settings):\n CONTROL_PANEL_LINKS.append(Link('setup-users', title='User Management'))\n\n\nEvents\n------\n\nBefore and after the settings are saved events for handling the changes are fired. To subscribe\nto the events use something like::\n\n from pyramid.events import subscriber\n from kotti_controlpanel.events import SettingsAfterSave\n\n @subscriber(SettingsAfterSave)\n def do_something_when_settings_saved(event):\n # Check if the settings for this module was saved.\n if not event.module == __package__:\n return\n my_fancy_thing()\n\nDefault schemas\n---------------\n\n``kotti_controlpanel`` provides some default schemas that you can use directly in your code and for\nexample purposes. Currently there are two schemas implemented, one to choose in what slot the\nwidget should be shown and another one to set the visibility of the widget. To use it in your\naddon place something like the following in your populator::\n\n from kotti.views.slots import assign_slot\n from kotti_controlpanel.config import SlotSchemaNode\n from kotti_controlpanel.config import ShowInContextSchemaNode\n from kotti_controlpanel.util import add_settings\n from kotti_controlpanel.util import get_setting\n from kotti_myaddon import _\n\n class MyWidgetSchema(colander.MappingSchema):\n slot = SlotSchemaNode(colander.String())\n show_in_context = ShowInContextSchemaNode(colander.String())\n\n MyAddonSettings = {\n 'name': 'myaddon_settings',\n 'title': _(u'My Addon Settings'),\n 'description': _(u\"Settings for my addon\"),\n 'success_message': _(u\"Successfully saved my addon settings.\"),\n 'schema_factory': MyAddonSchema,\n }\n\n def populate():\n add_settings(MyAddonSettings)\n\nNote\n-----\n\nThis package was insipred by `kotti_settings`_ package\n\n.. _Find out more about Kotti: http://pypi.python.org/pypi/Kotti\n.. _populators: http://kotti.readthedocs.org/en/latest/developing/configuration.html#kotti-populators\n.. _example: http://kotti.readthedocs.org/en/latest/developing/frontpage-different-template.html\n.. _kotti_google_analytics: https://pypi.python.org/pypi/kotti_google_analytics\n.. _kotti_settings: https://pypi.python.org/pypi/kotti_settings\n\n\nHistory\n=======\n\n\n1.0.8 - 1.0.9\n---------------\nDate: 2017-06-09\n\n- Bug fixes\n\n1.0.5 - 1.0.7\n--------------\n\n- Bug fixes\n- UI Improvements\n- Include Kotti_PDF\n- Change the Folder content type to inherit from Document content type, instead of Content.\n\n1.0.4\n------\n\n- Allowed attributes to be passed into the Schema node for form elements.\n\n1.0.3\n------\n\n- Fixed the viewing of package settings.\n\n1.0.2\n------\n\n- Fixed duplicate links on controlpanel page.\n\n1.0.1\n------\n\n- Added a page to list all system settings.\n\n\n1.0.0\n------\n\n- Fixed the setting of package settings.\n- Allowed packages to override their setting page.\n\n\n0.0.2\n--------\n\n- Allow links to be added to a controlpanel\n\n0.0.1 - unreleased\n--------------------\n\n- Create package with ``pcreate -s kotti kotti_controlpanel``.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/b4oshany/kotti_controlpanel", "keywords": "ui settings controlpanel kotti web cms wcms pylons pyramid sqlalchemy bootstrap", "license": "BSD-derived (http://www.repoze.org/LICENSE.txt)", "maintainer": null, "maintainer_email": null, "name": "kotti_controlpanel", "package_url": "https://pypi.org/project/kotti_controlpanel/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/kotti_controlpanel/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/b4oshany/kotti_controlpanel" }, "release_url": "https://pypi.org/project/kotti_controlpanel/1.0.9/", "requires_dist": null, "requires_python": null, "summary": "Settings configuration for Kotti", "version": "1.0.9" }, "last_serial": 2937392, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "789f65c941e165f82b99485ea768940f", "sha256": "5f8de2160f80c09a639424272339e189d4b23c847e0945e56bba80e25cdbbec6" }, "downloads": -1, "filename": "kotti_controlpanel-0.0.1.tar.gz", "has_sig": false, "md5_digest": "789f65c941e165f82b99485ea768940f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21781, "upload_time": "2016-08-20T18:23:12", "url": "https://files.pythonhosted.org/packages/6d/e3/8408c5f2a0c69a4c72bc30d1cd46991b68c58228043593304a61ea757a1f/kotti_controlpanel-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "c7958f9ce8abc82e5e43c1477526cd57", "sha256": "cdcd889da7ee4bb681e8e23175c50b980612a59c22dcdd5e62d0e41c165c9e2c" }, "downloads": -1, "filename": "kotti_controlpanel-0.0.2.tar.gz", "has_sig": false, "md5_digest": "c7958f9ce8abc82e5e43c1477526cd57", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22465, "upload_time": "2016-08-20T19:10:48", "url": "https://files.pythonhosted.org/packages/64/46/e9b1165c9753dacf899ad94fcf907e94497f25dab90c9a31dd5f046cef4e/kotti_controlpanel-0.0.2.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "d3b80a589c022b1e42a0d00bbb7e8af5", "sha256": "a5cd519e3a2526b47e31b8971e74562f66036efdfa592ce7aaaf58a57b1820d4" }, "downloads": -1, "filename": "kotti_controlpanel-1.0.0.tar.gz", "has_sig": false, "md5_digest": "d3b80a589c022b1e42a0d00bbb7e8af5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22140, "upload_time": "2016-08-21T23:24:00", "url": "https://files.pythonhosted.org/packages/0c/d1/cf1454e253138dc38921fa07405ec1e65ae6bb8802ef91be331e1f14156b/kotti_controlpanel-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "ae5a6ca8c169e0a04f5cb01668dacaff", "sha256": "91d01c6d696bf1aeefc02895008ed2aed0344ab1203c6eff86c6972d05341970" }, "downloads": -1, "filename": "kotti_controlpanel-1.0.1.tar.gz", "has_sig": false, "md5_digest": "ae5a6ca8c169e0a04f5cb01668dacaff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23042, "upload_time": "2016-08-22T03:37:00", "url": "https://files.pythonhosted.org/packages/a3/0e/785a7c51b59b331bf6967a164a89f468d666c99fc333f25ca6989321f32a/kotti_controlpanel-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "23e4f5ab79e321cc03884f5c99a744a6", "sha256": "c78b07a27742a62dd0190eebbb6e8b62731699f96bdb5a3301c37e1893eeb673" }, "downloads": -1, "filename": "kotti_controlpanel-1.0.2.tar.gz", "has_sig": false, "md5_digest": "23e4f5ab79e321cc03884f5c99a744a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23127, "upload_time": "2016-08-22T04:21:03", "url": "https://files.pythonhosted.org/packages/79/f8/e46660ff2332b761e431a465ee27593ece60e6c566735a971d4c54ee4654/kotti_controlpanel-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "9022a3ea130f4df57df5f42b5a5a2486", "sha256": "1f99a72f48d96e1717a2e7f8156201041dff6f574d782111ad31efa5a571eb6c" }, "downloads": -1, "filename": "kotti_controlpanel-1.0.3.tar.gz", "has_sig": false, "md5_digest": "9022a3ea130f4df57df5f42b5a5a2486", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22918, "upload_time": "2016-08-22T05:36:11", "url": "https://files.pythonhosted.org/packages/6e/a9/a1a456be328841d1b06327b6645c57448f4855476c7a64bb3c7129d75094/kotti_controlpanel-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "834b196be1ba771f32b32f55054411fe", "sha256": "667d07eb067025c9f8fa86c477b867024dbc203dbab4d3516e222bbccbae988b" }, "downloads": -1, "filename": "kotti_controlpanel-1.0.4.tar.gz", "has_sig": false, "md5_digest": "834b196be1ba771f32b32f55054411fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23054, "upload_time": "2017-01-06T17:56:00", "url": "https://files.pythonhosted.org/packages/3e/83/3fdb4e1ea81b3434f3add2b580185db5df741187cc1820e5ca440db2ed07/kotti_controlpanel-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "d7304e9f449e5cac6e0625aa51c41b8e", "sha256": "a3b0005cd5beabaa8820ae1bfa5740ee1e5180a711825ab3e1067a3215c41241" }, "downloads": -1, "filename": "kotti_controlpanel-1.0.5.tar.gz", "has_sig": false, "md5_digest": "d7304e9f449e5cac6e0625aa51c41b8e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23459, "upload_time": "2017-04-20T20:55:05", "url": "https://files.pythonhosted.org/packages/ce/48/f3aad5ef35b70daa337f2d16cdd43981ee53f8b936dc198a86f5b59b3970/kotti_controlpanel-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "0d7c6a08115c10c52f5c8f1637f78f60", "sha256": "507851637f7a23c286ed92d505edece11d154a87a14f6e6561b28afadd3505ef" }, "downloads": -1, "filename": "kotti_controlpanel-1.0.6.tar.gz", "has_sig": false, "md5_digest": "0d7c6a08115c10c52f5c8f1637f78f60", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31399, "upload_time": "2017-04-20T21:42:16", "url": "https://files.pythonhosted.org/packages/be/46/4c731d6da62ddca5831fa68944a5877f77ac6da8dce2d70d4e30bb541220/kotti_controlpanel-1.0.6.tar.gz" } ], "1.0.7": [ { "comment_text": "", "digests": { "md5": "f0e38a1f37353aa334f8aa9a929a8ef1", "sha256": "33ee6ded4bb9556e15bb30bf782f68dc1a2acdb86c2fceed06dd44c4f95df91b" }, "downloads": -1, "filename": "kotti_controlpanel-1.0.7.tar.gz", "has_sig": false, "md5_digest": "f0e38a1f37353aa334f8aa9a929a8ef1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31966, "upload_time": "2017-05-11T16:41:54", "url": "https://files.pythonhosted.org/packages/42/a7/6694b14d4a586c166eb6229f7e61c0f4c94560108eec017b770fd4617da3/kotti_controlpanel-1.0.7.tar.gz" } ], "1.0.8": [ { "comment_text": "", "digests": { "md5": "ba069eba38465852d3632ffc56555b38", "sha256": "3a6a67e37c151a44ca11beaa3a1c925bb3e5f9520a2199aacb4e94259937c470" }, "downloads": -1, "filename": "kotti_controlpanel-1.0.8.tar.gz", "has_sig": false, "md5_digest": "ba069eba38465852d3632ffc56555b38", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31969, "upload_time": "2017-05-12T01:52:38", "url": "https://files.pythonhosted.org/packages/cd/1f/f362470b71b72848e3da57b3520bcc548be4fc5452a66077fe5de74a6cfc/kotti_controlpanel-1.0.8.tar.gz" } ], "1.0.9": [ { "comment_text": "", "digests": { "md5": "4af7aa86fa260273640fb9940853adf0", "sha256": "8c27e2fb77d383fd64a5d135b3e5780ce125b0571b1b399f1a7ede6adf11374f" }, "downloads": -1, "filename": "kotti_controlpanel-1.0.9.tar.gz", "has_sig": false, "md5_digest": "4af7aa86fa260273640fb9940853adf0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32330, "upload_time": "2017-06-09T07:19:32", "url": "https://files.pythonhosted.org/packages/4f/0c/d8a7fcc979300fa1e117d0a5d2649b10ddc05d6b65e62a8da8223cba89bc/kotti_controlpanel-1.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4af7aa86fa260273640fb9940853adf0", "sha256": "8c27e2fb77d383fd64a5d135b3e5780ce125b0571b1b399f1a7ede6adf11374f" }, "downloads": -1, "filename": "kotti_controlpanel-1.0.9.tar.gz", "has_sig": false, "md5_digest": "4af7aa86fa260273640fb9940853adf0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32330, "upload_time": "2017-06-09T07:19:32", "url": "https://files.pythonhosted.org/packages/4f/0c/d8a7fcc979300fa1e117d0a5d2649b10ddc05d6b65e62a8da8223cba89bc/kotti_controlpanel-1.0.9.tar.gz" } ] }