{ "info": { "author": "Sylvain Viollon", "author_email": "thefunny@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "=============\nzeam.form.rdb\n=============\n\n\n``zeam.form.rdb`` provides an helper to generate form fields for\n`zeam.form.base`_, using `zeam.form.ztk`_ fields from an `SQLAlchemy`_\nmodel.\n\nTo accomplish, you must create your fields using the descriptor\n``ModelFields`` in your form. It will automatically fetch the context\nof the form, and generate the fields accordingly, caching them (for\nperformance reasons).\n\nExample::\n\n from zeam.form.rdb import ModelFields\n from zeam.form.base import Form\n\n class MyForm(Form):\n label = \"Test form\"\n fields = ModelFields()\n\n\nIn your `SQLAlchemy`_ schema, you can use the extra dictionnary\n``info`` to control the widget generated. Foreign key will generate a\nchoice of possible values to select, using the column you desire as\ntitle.\n\nExample::\n\n from sqlalchemy import Column, ForeignKey\n from sqlalchemy.types import Integer, String\n from zeam.form.ztk.widgets.uri import URIField\n\n idT_Effort = Column(\n 'idT_Effort',\n Integer,\n primary_key=True,\n info={'title': u\"Identifier\"})\n idT_Opportunity = Column(\n 'idT_Opportunity',\n Integer,\n ForeignKey('T_Opportunity.idT_Opportunities'),\n info={'title': u'Opportunity',\n 'foreignTitleColumn': 'Title'})\n Name = Column(\n 'Name',\n String(45),\n info={'minLength': 20,\n 'maxLength': 45})\n URL = Column(\n 'URL',\n String(63),\n info={'title': u\"URL\",\n 'description': u\"Website URL\"\n 'factory': URIField,\n 'defaultValue': 'http://github.com',\n 'required': True})\n\n\nFor a ForeignKey, you have the possibility to provides multiple\ncolumns to ``foreignTitleColumn``, and a function to be called to\ncreate the title as ``foreignTitleFactory``, both in the ``info``\ndictionnary. ``foreignTitleQuery`` can specified to refine the\nSQLAlchemy request used to obtain the title terms.\n\nA field will be required unless the column is nullable, or the option\n``required`` is given through ``info``.\n\n``title`` and ``description`` from ``info`` will be used as well in\norder to create the form field.\n\n\n.. _zeam.form.base: http://pypi.python.org/pypi/zeam.form.base\n.. _zeam.form.ztk: http://pypi.python.org/pypi/zeam.form.ztk\n.. _SQLAlchemy: http://www.sqlalchemy.org/\n\nChanges\n=======\n\n1.0.1 (2012/12/12)\n------------------\n\n* Fix title factory to support unicode values.\n\n1.0 (2012/10/11)\n----------------\n\n* Refactor not to rely any longer on ``zope.schema`` or\n ``megrok.rdb``. SQLAlchemy Column's are directly converted to zeam\n form fields. This requires ``zeam.form.ztk`` 1.3 or higher.\n\n* Add tests on field generation.\n\n\n1.0b2 (2012/06/21)\n------------------\n\n* Add support for ``title_query`` to filter out terms in a generated\n ForeignKey vocabulary.\n\n1.0b1 (2012/04/27)\n------------------\n\n* Initial version.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/zeam.form.rdb", "keywords": "zeam form rdb", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "zeam.form.rdb", "package_url": "https://pypi.org/project/zeam.form.rdb/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/zeam.form.rdb/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/zeam.form.rdb" }, "release_url": "https://pypi.org/project/zeam.form.rdb/1.0.1/", "requires_dist": null, "requires_python": null, "summary": "Extra SQLAlchemy support for zeam.form", "version": "1.0.1" }, "last_serial": 2973089, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "3b7fec33ea1b8e2d7d32c52946c9f4da", "sha256": "703d955cb4b9db85a2786a496459bd51e8a0308dc047dd4fc93238f0a6e38202" }, "downloads": -1, "filename": "zeam.form.rdb-1.0.tar.gz", "has_sig": false, "md5_digest": "3b7fec33ea1b8e2d7d32c52946c9f4da", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6699, "upload_time": "2012-10-11T10:05:41", "url": "https://files.pythonhosted.org/packages/ea/11/dc2c47aec1f5236dc7661bc393acd3b70d1d34556b763cdae3267ad425b4/zeam.form.rdb-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "5f8f303c822befc04c594120924988e7", "sha256": "ea76f2c4ef0ed4cebe4c12260ecc909d1f1ee9a564cd1a6dd33f4bfa2d148ad9" }, "downloads": -1, "filename": "zeam.form.rdb-1.0.1.tar.gz", "has_sig": false, "md5_digest": "5f8f303c822befc04c594120924988e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6727, "upload_time": "2012-12-12T16:05:53", "url": "https://files.pythonhosted.org/packages/8d/25/b430ebcff28f49a79d5976af7dc1afcc01202aada04b03641901cd122c89/zeam.form.rdb-1.0.1.tar.gz" } ], "1.0b1": [ { "comment_text": "", "digests": { "md5": "5b4d1c028ed461c850abde736880e65c", "sha256": "b2df39666038af672b1a705afd4d8c1290b187890e792196ffdcfd5b242d1192" }, "downloads": -1, "filename": "zeam.form.rdb-1.0b1.tar.gz", "has_sig": false, "md5_digest": "5b4d1c028ed461c850abde736880e65c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3918, "upload_time": "2012-04-27T12:18:47", "url": "https://files.pythonhosted.org/packages/2b/db/c3b24cd3f7b19e062968fee9bf155ead18fd734288e1a9ba2ce1a10d4750/zeam.form.rdb-1.0b1.tar.gz" } ], "1.0b2": [ { "comment_text": "", "digests": { "md5": "04c07f3b3ef046d311f807036fc4acc9", "sha256": "629ffbc2dec7511af9290f5795b9d85d7e21665fffde97f1b6d8d27fbba6feaf" }, "downloads": -1, "filename": "zeam.form.rdb-1.0b2.tar.gz", "has_sig": false, "md5_digest": "04c07f3b3ef046d311f807036fc4acc9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4568, "upload_time": "2012-06-21T11:32:33", "url": "https://files.pythonhosted.org/packages/73/a8/2ca240befe63b4160bbedfc83f2f34e2dbcaf20610c5221cac805bbdcc27/zeam.form.rdb-1.0b2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5f8f303c822befc04c594120924988e7", "sha256": "ea76f2c4ef0ed4cebe4c12260ecc909d1f1ee9a564cd1a6dd33f4bfa2d148ad9" }, "downloads": -1, "filename": "zeam.form.rdb-1.0.1.tar.gz", "has_sig": false, "md5_digest": "5f8f303c822befc04c594120924988e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6727, "upload_time": "2012-12-12T16:05:53", "url": "https://files.pythonhosted.org/packages/8d/25/b430ebcff28f49a79d5976af7dc1afcc01202aada04b03641901cd122c89/zeam.form.rdb-1.0.1.tar.gz" } ] }