{ "info": { "author": "Johannes Raggam", "author_email": "thetetet@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Plone", "Framework :: Plone :: 5.0", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7" ], "description": "=========================\ncollective.contentcreator\n=========================\n\nCreate content structures from JSON files or Python dictionaries.\n\nThis package is meant as a helper to quickly create content structures from JSON files or Python structures for the purpose of pre-filling a site in development.\nIt's the successor of the package `collective.setuphandlertools `_.\n\n\nExamples\n--------\n\nRegister a ``post_handler`` in a GenericSetup profile:\n\n.. code-block:: xml\n\n \n\nIn your ``setuphandler.py``:\n\n.. code-block:: python\n\n # -*- coding: utf-8 -*-\n from collective.contentcreator import create_item_runner\n from collective.contentcreator import load_json\n from zope.component.hooks import getSite\n\n\n def basic_content(context):\n content_structure = load_json('data/basic_content.json', __file__)\n create_item_runner(\n getSite(),\n content_structure,\n default_lang='en',\n default_wf_action='publish'\n )\n\nAnd in your ``data/basic_content.json``:\n\n.. code-block:: json\n\n [\n {\n \"@type\": \"Folder\",\n \"id\": \"main\",\n \"title\": \"Main Folder\",\n \"items\": [\n {\"@type\": \"Page\", \"title\": \"Page within Folder\"},\n {\"@type\": \"Folder\", \"title\": \"Folder within Folder\", \"description\": \"Not much more in here.\"}\n ]\n }\n ]\n\n\nLicense\n-------\n\nThe project is licensed under the GPLv2.\n\n\nChangelog\n=========\n\n\n2.0 (2018-12-03)\n----------------\n\n- Use ``plone.restapi`` and base content creator on ``plone.restapi.services.content.add``.\n This gives us correct value deserialization and schema validation.\n E.g. text fields are correctly deserialized to ``plone.app.textfield`` values.\n\n Breaking Change: The JSON Structure is based on the ``plone.restapi`` JSON structure.\n TBD\n See: https://plonerestapi.readthedocs.io/en/latest/content.html#creating-a-resource-with-post\n [thet]\n\n\n1.0 (2018-12-01)\n----------------\n\n- Initial release.\n [thet]", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/collective/collective.contentcreator", "keywords": "Python Plone", "license": "GPL version 2", "maintainer": "", "maintainer_email": "", "name": "collective.contentcreator", "package_url": "https://pypi.org/project/collective.contentcreator/", "platform": "", "project_url": "https://pypi.org/project/collective.contentcreator/", "project_urls": { "Homepage": "https://github.com/collective/collective.contentcreator" }, "release_url": "https://pypi.org/project/collective.contentcreator/2.0/", "requires_dist": null, "requires_python": "", "summary": "Create content structures from JSON configurations", "version": "2.0" }, "last_serial": 4554609, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "5fb70cfd5abf70e80dfba31f08527ad2", "sha256": "74ff587cf359ed7e89cf96dd6c2ba3eee4ec1bcfe70a6249fcedfb1b73c9b721" }, "downloads": -1, "filename": "collective.contentcreator-1.0.tar.gz", "has_sig": false, "md5_digest": "5fb70cfd5abf70e80dfba31f08527ad2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11746, "upload_time": "2018-12-01T15:55:58", "url": "https://files.pythonhosted.org/packages/0a/51/79c36d1c2661136b34e55775606e6b63d9c74b92336596bc9af73d50aaf0/collective.contentcreator-1.0.tar.gz" } ], "2.0": [ { "comment_text": "", "digests": { "md5": "bc57ccb7c79132a60aff29e679ff2052", "sha256": "ef8361ad326116767e00728cf1631052ebf8994d14dfb592f77cf32d13c4491f" }, "downloads": -1, "filename": "collective.contentcreator-2.0.tar.gz", "has_sig": false, "md5_digest": "bc57ccb7c79132a60aff29e679ff2052", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11632, "upload_time": "2018-12-03T07:37:55", "url": "https://files.pythonhosted.org/packages/5b/8b/223bab25f8be860e8dd534cc7346e3059ed7289e82f3ef8131c3d356a6db/collective.contentcreator-2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bc57ccb7c79132a60aff29e679ff2052", "sha256": "ef8361ad326116767e00728cf1631052ebf8994d14dfb592f77cf32d13c4491f" }, "downloads": -1, "filename": "collective.contentcreator-2.0.tar.gz", "has_sig": false, "md5_digest": "bc57ccb7c79132a60aff29e679ff2052", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11632, "upload_time": "2018-12-03T07:37:55", "url": "https://files.pythonhosted.org/packages/5b/8b/223bab25f8be860e8dd534cc7346e3059ed7289e82f3ef8131c3d356a6db/collective.contentcreator-2.0.tar.gz" } ] }