{ "info": { "author": "Dieter Maurer", "author_email": "dieter@handshake.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: Zope", "Framework :: Zope2", "Framework :: Zope :: 4", "Intended Audience :: Developers", "License :: OSI Approved :: Zope Public License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Utilities" ], "description": "This package contains code generators to facilitate the development of Zope[2]\napplications.\n\n=======\nModules\n=======\n\nconstructor\n===========\n\nThis module contains factories for the generation of add form and\nadd action for ``OFS.PropertyManager.PropertyManager`` based classes.\nThe generated functions are usually used as constructors in ``registerClass``\ncalls during product initialization. The subpackage ``test`` contains an\nexample (also used for testing this product).\n\nThe class' ``_properties`` attribute and the associated default values\nare used for add form generation.\n\nThe module tries hard to avoid encoding problems. Its functions\nneed to handle up to 3 encodings: the encoding used for the code,\nthe encoding used for non unicode properties and unicode properties.\nThe browser can only handle a single encoding per page. Therefore,\nthe module must use a single encoding and all other encodings must\nbe mapped. The module uses ``utf-8`` as this unified encoding.\nThe module does nothing special with strings from code. The page template\nwill convert it to unicode in its standard way. Use unicode strings,\nif this gives not the expected result. Unicode based properties\nare passed on unchanged to the template. ``str`` based properties\nare mapped to unicode with a charset that is either explicitely specified,\nlooked up in the current acquisition context under the name\n``management_page_charset`` and falls back to ``ZPublisher.default_encoding``.\nThe form action converts values for those properties back to ``str``\nusing the same charset.\n\n\nadd_form_factory\n----------------\n\nThis factory generates an add form for an\n``OFS.PropertyManager.PropertyManager`` subclass.\nIt has the following parameters.\n\n\n ============= =========================== ======================================\n name default description\n ============= =========================== ======================================\n *class_* the class to generate the form for\n *action* ``add_``\\ *classname* the forms action\n *description* *class_*\\ ``.__doc__`` the documentation shown in the form\n *charset* see above \n *template* package provided the template to generate the form\n ============= =========================== ======================================\n\nThe template it brought into the acquisition context of the\ngenerated functions argument and then called with the\nkeyword parameters ``charset``,\n``meta_type``, ``description``, ``action``, ``properties``\nand ``class_``. The call should return the HTML\nform representation. The package provided template works well\ntogether with the add action created by the add action factory.\n\nWhen you plan to customize the template, please take a look\nat the package provided template and the docstring in the source\nas this page does not describe all details.\n\nDue to a bug/weakness, Zope's property management\npage handles unicode properties only correctly\nwhen it can use the utf-8 charset.\nTherefore, it is highly recommended to use utf-8 consistently.\nOtherwise, it is possible that property values set with functions\nof this module cannot be reliably edited later.\nNote in addition, that Zope's property management spells the\nutf-8 charset (stupidly) as ``UTF-8`` (note the upper case).\nTherefore, use ``UFT-8`` rather than ``utf-8`` when you specify\nthe utf-8 charset for your ``management_page_charset``.\n\n\nadd_action_factory\n------------------\n\nThis factory generates an add action for an\n``OFS.PropertyManager.PropertyManager`` subclass.\nThe generated action creates an instance of this class, sets its properties,\nadds it as content object of its first parameter (assumed to be\nan ``OFS.ObjectManager.ObjectManager``) and optionally calls\na hook. Then, it either returns the created instance or redirects\nto its management interface.\n\nThe factory has the parameters *class_* and the optional *hook*.\n\nThe generated action has the parameters *id* and the\noptional *props* and *REQUEST*.\n\n*props* specifies property values\nfor the created instance. If not specified and *REQUEST* is passed,\nit defaults to ``REQUEST.form``. If specified, it must be a mapping.\nIf the property value mapping lacks values for some properties, these\nretain their default values; values for undefined properties are silently\nignored.\n\n\n=======\nHistory\n=======\n\n1.1\n Python3/Zope4 compatibility\n\n1.0\n for Zope2", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/dm.zope.generate", "keywords": "application development zope", "license": "ZPL", "maintainer": "", "maintainer_email": "", "name": "dm.zope.generate", "package_url": "https://pypi.org/project/dm.zope.generate/", "platform": "", "project_url": "https://pypi.org/project/dm.zope.generate/", "project_urls": { "Homepage": "http://pypi.python.org/pypi/dm.zope.generate" }, "release_url": "https://pypi.org/project/dm.zope.generate/1.1.1/", "requires_dist": null, "requires_python": "", "summary": "Code generation to facilitate Zope[2] application development.", "version": "1.1.1" }, "last_serial": 4620735, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "1cc20785f4df9641b66bbf9619716a1a", "sha256": "6762d17cba61cc0ee1f2c440aca3755db3aea1eb6df42741304ceeacff19ca08" }, "downloads": -1, "filename": "dm.zope.generate-1.0.tar.gz", "has_sig": false, "md5_digest": "1cc20785f4df9641b66bbf9619716a1a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9621, "upload_time": "2010-03-13T16:16:00", "url": "https://files.pythonhosted.org/packages/31/c0/62cd4921bb5256918332eca7e91818b38d409eea942dea64ee7cf666cd04/dm.zope.generate-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "191c351219205f6d488016c060365833", "sha256": "d43e4397e06b1354750edcfd49e7b009e04f99275d28cb5973a89d40799c086e" }, "downloads": -1, "filename": "dm.zope.generate-1.1.tar.gz", "has_sig": false, "md5_digest": "191c351219205f6d488016c060365833", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12512, "upload_time": "2018-12-06T10:45:21", "url": "https://files.pythonhosted.org/packages/7b/7b/c827d7fa7213958394b5f167275c6a9516779453bdbd1c8cc8fede5043cc/dm.zope.generate-1.1.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "83fe2c282c5f803f07265d0fac07ee5b", "sha256": "58971905da657463f84fc17065091ca5b154ce2e5d73287beb0e6ea3272bdac2" }, "downloads": -1, "filename": "dm.zope.generate-1.1.1.tar.gz", "has_sig": false, "md5_digest": "83fe2c282c5f803f07265d0fac07ee5b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12513, "upload_time": "2018-12-20T13:04:56", "url": "https://files.pythonhosted.org/packages/e1/fb/73926da5215f97c62d7274698979aac069237c2555c4b00253cc4deca223/dm.zope.generate-1.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "83fe2c282c5f803f07265d0fac07ee5b", "sha256": "58971905da657463f84fc17065091ca5b154ce2e5d73287beb0e6ea3272bdac2" }, "downloads": -1, "filename": "dm.zope.generate-1.1.1.tar.gz", "has_sig": false, "md5_digest": "83fe2c282c5f803f07265d0fac07ee5b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12513, "upload_time": "2018-12-20T13:04:56", "url": "https://files.pythonhosted.org/packages/e1/fb/73926da5215f97c62d7274698979aac069237c2555c4b00253cc4deca223/dm.zope.generate-1.1.1.tar.gz" } ] }