{ "info": { "author": "Martin Aspeli", "author_email": "optilude@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "==========================\nplone.directives.dexterity\n==========================\n\nThis package provides optional, Grok-like directives for configuring\nDexterity content. It depends on five.grok, which in turn depends on\nthe various re-usable grokcore.* packages, but not Grok itself.\n\nSee also plone.directives.form, which provides directives for configuring\nschema interfaces with form hints.\n\nContent classes\n---------------\n\nContent extending the Dexterity 'Item' and 'Container' base classes can be\ngrokked in order to register a factory and/or ZMI add permission.\n\nFor example::\n\n from plone.directives import dexterity\n from plone.directives import form\n from five import grok\n from zope import schema\n\n class IPage(form.Schema):\n \n title = schema.TextLine(title=u\"Title\")\n \n description = schema.Text(title=u\"Description\",\n description=u\"Summary of the body\")\n \n body = schema.Text(title=u\"Body text\",\n required=False,\n default=u\"Body text goes here\")\n\n details = schema.Text(title=u\"Details\",\n required=False)\n\n class FSPage(dexterity.Item):\n grok.implements(IPage)\n grok.name('example.page')\n \n def __init__(self, id=None, title=None, description=None, body=None, details=None):\n self.id = id # required - or call super() with this argument\n self.title = title\n self.description = description\n self.body = body\n self.details = details\n \nThis will register a factory utility if one is not already present with\nthe name 'example.fspage'.\n\nYou can also use the 'add_permission()' directive to cause the type to be\nregistered as a Zope 2 content class, in the same way that the \n directive does::\n\n class ZopeTwoItem(dexterity.Item):\n grok.implements(IPage)\n dexterity.add_permission('cmf.AddPortalContent')\n portal_type = 'example.zopetwopage'\n\nHowever, for most content types, this will be unnecessary.\n\nForms\n-----\n\nTo create a Dexterity add-, edit- or display form for your type, use the\nAddForm, EditForm or DisplayForm base classes. For example::\n\n from plone.directives import dexterity\n from plone.directives import form\n from five import grok\n from zope import schema\n\n class IPage(form.Schema):\n \n title = schema.TextLine(title=u\"Title\")\n \n description = schema.Text(title=u\"Description\",\n description=u\"Summary of the body\")\n \n body = schema.Text(title=u\"Body text\",\n required=False,\n default=u\"Body text goes here\")\n\n details = schema.Text(title=u\"Details\",\n required=False)\n\n class View(dexterity.DisplayForm):\n \"\"\"The view. May will a template from _templates/view.pt,\n and will be called 'view' unless otherwise stated.\n \"\"\"\n grok.require('zope2.View')\n grok.context(IPage)\n \n class Edit(dexterity.EditForm):\n \"\"\"A standard edit form.\n \"\"\"\n grok.context(IPage)\n \n def updateWidgets(self):\n super(Edit, self).updateWidgets()\n self.widgets['title'].mode = 'hidden'\n\nThese forms are grokked in a manner that is similar to\n`plone.directives.form`_, and support custom template associations. Please\nnote, however:\n\n* When using ``dexterity.AddForm`` as a base, you must use the ``grok.name()``\n directive to give the name of the add view. Usually, this is the same as\n the name of the Factory Type Information object.\n* When using ``dexterity.EditForm`` as a base, you must use ``grok.context()``\n and supply a Dexterity content type interface as an argument. This is to\n allow proper re-use of types.\n\n.. _plone.directives.form: http://pypi.python.org/pypi/plone.directives.form\n\n=========\nChangelog\n=========\n\n1.0.2 - 2011-09-25\n------------------\n\n* Fix super() call in ``plone.directives.dexterity.AddForm``\n [davisagli]\n\n1.0.1 - 2011-09-24\n------------------\n\n* Honor the ``plone.directives.form.wrap`` directive on add forms.\n They remain wrapped by default for backwards-compatibility with custom\n templates.\n This closes http://code.google.com/p/dexterity/issues/detail?id=184\n [davisagli]\n\n1.0 - 2011-05-20\n----------------\n\n* Fix reST.\n [davisagli]\n\n1.0b1 - 2010-08-05\n------------------\n\n* Make sure custom add forms redirect to the correct place after creating\n content. Fixes http://code.google.com/p/dexterity/issues/detail?id=136\n [optilude]\n\n1.0a2 - 2009-11-17\n------------------\n\n* Fix deprecation warnings on Zope 2.12\n [optilude]\n\n1.0a1 - 2009-07-25\n------------------\n\n* Initial release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://code.google.com/p/dexterity", "keywords": "grok plone dexterity content", "license": "LGPL", "maintainer": null, "maintainer_email": null, "name": "plone.directives.dexterity", "package_url": "https://pypi.org/project/plone.directives.dexterity/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/plone.directives.dexterity/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://code.google.com/p/dexterity" }, "release_url": "https://pypi.org/project/plone.directives.dexterity/1.0.2/", "requires_dist": null, "requires_python": null, "summary": "Grok-like directives for creating Dexterity content", "version": "1.0.2" }, "last_serial": 796390, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "f3d214ccaeada1d49114f316c3f50dec", "sha256": "5193e0ae4cdc9f5c672f326b1e5d41fd462aa7ed1a9c577c1c3f73f46e345ee6" }, "downloads": -1, "filename": "plone.directives.dexterity-1.0.zip", "has_sig": false, "md5_digest": "f3d214ccaeada1d49114f316c3f50dec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24968, "upload_time": "2011-05-20T23:38:10", "url": "https://files.pythonhosted.org/packages/f3/c6/1bade1b997a457f5270e813ce6fff55f7739293e7414c4c599f6e667bcfb/plone.directives.dexterity-1.0.zip" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "701e1852191f2d35d6568659e2899274", "sha256": "b62650147e663be7c3bc08a385f3c1117778bbc7e3d368dc39103ac129fe8490" }, "downloads": -1, "filename": "plone.directives.dexterity-1.0.1.zip", "has_sig": false, "md5_digest": "701e1852191f2d35d6568659e2899274", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25429, "upload_time": "2011-09-24T22:26:16", "url": "https://files.pythonhosted.org/packages/01/d7/9f659b1d49a7e4952afb682af3de4d7cb7ecd468d777f656da55f1712974/plone.directives.dexterity-1.0.1.zip" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "713b87644e3591b60b4a8ebd52987477", "sha256": "502dff4e5b4f57c78e88849863b6e9757971477c32c2e61655f98c6b62e76b14" }, "downloads": -1, "filename": "plone.directives.dexterity-1.0.2.zip", "has_sig": false, "md5_digest": "713b87644e3591b60b4a8ebd52987477", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25505, "upload_time": "2011-09-26T05:08:11", "url": "https://files.pythonhosted.org/packages/00/08/24ab3c049600f3fc8875c04af5bd877dd6c50191f7cb015677bed6456389/plone.directives.dexterity-1.0.2.zip" } ], "1.0a1": [ { "comment_text": "", "digests": { "md5": "fe50ca153d27cd1ed88dff93869bc4f9", "sha256": "26e3127e49be0ad8cbe09b82b3e3ba5446de84f313df6b98ce4fc0fac9461c87" }, "downloads": -1, "filename": "plone.directives.dexterity-1.0a1.tar.gz", "has_sig": false, "md5_digest": "fe50ca153d27cd1ed88dff93869bc4f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14002, "upload_time": "2009-07-25T12:47:01", "url": "https://files.pythonhosted.org/packages/ea/d7/ea1715f3eba30f82099683f54402226432ee8ab6f5dc02c7553a8520e632/plone.directives.dexterity-1.0a1.tar.gz" } ], "1.0a2": [ { "comment_text": "", "digests": { "md5": "120f760fe663b284786a01dbe42d4b59", "sha256": "25b7dfd4493b32ffea2e5067f19049d635f4fdf8dd1b98c9f0c8e39f04559297" }, "downloads": -1, "filename": "plone.directives.dexterity-1.0a2.tar.gz", "has_sig": false, "md5_digest": "120f760fe663b284786a01dbe42d4b59", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13180, "upload_time": "2009-11-17T15:20:05", "url": "https://files.pythonhosted.org/packages/7c/a7/134f81ec3ec4b87cfbe9629f1a7930512c5fd12dad7d4b5c0a1d82200e5d/plone.directives.dexterity-1.0a2.tar.gz" } ], "1.0b1": [ { "comment_text": "", "digests": { "md5": "20475158adfffe8a4e9d4a1d07321fc9", "sha256": "ae6e02fdf6bcfe5d233a4db706f2fd257d611dfb94f7fc4e37dc8711cce3fb0b" }, "downloads": -1, "filename": "plone.directives.dexterity-1.0b1.zip", "has_sig": false, "md5_digest": "20475158adfffe8a4e9d4a1d07321fc9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24660, "upload_time": "2010-08-05T07:07:24", "url": "https://files.pythonhosted.org/packages/79/c8/d6fe11b9e91726e21cd247756d842a7e8f308123e6bef3070bd414a2b8c9/plone.directives.dexterity-1.0b1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "713b87644e3591b60b4a8ebd52987477", "sha256": "502dff4e5b4f57c78e88849863b6e9757971477c32c2e61655f98c6b62e76b14" }, "downloads": -1, "filename": "plone.directives.dexterity-1.0.2.zip", "has_sig": false, "md5_digest": "713b87644e3591b60b4a8ebd52987477", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25505, "upload_time": "2011-09-26T05:08:11", "url": "https://files.pythonhosted.org/packages/00/08/24ab3c049600f3fc8875c04af5bd877dd6c50191f7cb015677bed6456389/plone.directives.dexterity-1.0.2.zip" } ] }