{ "info": { "author": "Simon Kaeser", "author_email": "skaeser@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python" ], "description": "Introduction\n============\n\nThe ``horae.autocomplete`` package provides autocomplete fields and widgets for\n`zope.formlib `_ based on the\n`autocomplete widget of jQuery UI `_.\n\nUsage\n=====\n\nThere are two types of autocomplete fields available:\n\n**AutocompleteList**\n Allows selection of multiple values\n**AutocompleteChoice**\n Allows selection of one value\n\nTo enable autocompletion for a list or choice field simply replace the ``List``\nrespectively the ``Choice`` from `zope.schema `_\nby the one provided in ``horae.autocomplete.fields``::\n\n from zope import interface, schema\n \n from horae.autocomplete import fields\n \n class ISampleSchema(interface.Interface):\n \"\"\" A schema using an autocomplete choice and list field\n \"\"\"\n \n choice = fields.AutocompleteChoice(\n values = (u'one', u'two', u'three',)\n )\n \n list = fields.AutocompleteList(\n value_type = schema.Choice(\n values=(u'Tag 1', u'Tag 2', u'Tag 3',)\n )\n )\n\nThe ``AutocompleteChoice`` field takes exactly the same parameters as the ``Choice`` field\nprovided by `zope.schema `_. The same is true for\nthe ``AutocompleteList`` field which takes the same parameters as the ``List`` field of\n`zope.schema `_ with the only restriction that\nthe ``value_type`` has to be either a ``Choice`` or ``TextLine`` field.\n\nAdvanced usage\n--------------\n\nValue providers\n'''''''''''''''\n\nThe available values presented to the user when entering a term into the field are provided\nby adapters implementing ``horae.autocomplete.interfaces.IValueProvider``. There are default\nvalue providers already implemented which look up the available values based on the given\ninput in the vocabulary of the field. This is done by iterating over the values in the\nvocabulary and check whether a value matches the given input. For very large or infinite\nvocabularies this is quite expensive or not possible at all. To efficiently support such\nvocabularies value providers may be overridden by registering a more specific adapter\nimplementing ``horae.autocomplete.interfaces.IValueProvider``. Those adapters are looked\nup in the following order where the first one found is used:\n\n**Named contextual provider**\n A value provider adapting the ``context``, ``field`` and ``request`` registered with the\n same name as the field\n**Named uncontextual provider**\n A value provider adapting the ``field`` and ``request`` registered with the same name as\n the field\n**Contextual provider**\n A value provider adapting the ``context``, ``field`` and ``request``\n**Uncontextual provider**\n A value provider adapting the ``field`` and ``request``\n\nExamples of custom value providers is found in the `horae.search `_\npackage which provides non iterable vocabularies and corresponding value providers which\nuse full text search in a catalog to look up the available values based on the input.\n\nField providers\n'''''''''''''''\n\nAs mentioned in the previous chapter the value providers are adapters adapting at least the\n``field`` and the ``request``. To look up those providers the field needs to be looked up\nfirst. In most cases this is not an issue at all since the fields are defined by the schema\nof the form. But in some cases the field is placed in the form only when rendering it which\nwould then require to render the whole form only to find the required field. To efficiently\nsupport this use-case the way how a field is looked up may be overridden by registering an\nadapter implementing ``horae.autocomplete.interfaces.IFieldProvider`` and adapting the\n``context`` and ``request``.\n\nDependencies\n============\n\n* `fanstatic `_\n* `zope.fanstatic `_\n* `js.jquery `_\n* `js.jqueryui `_\n\nChangelog\n=========\n\n1.0a1 (2012-01-16)\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": "UNKNOWN", "keywords": "", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "horae.autocomplete", "package_url": "https://pypi.org/project/horae.autocomplete/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/horae.autocomplete/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/horae.autocomplete/1.0a1/", "requires_dist": null, "requires_python": null, "summary": "Provides autocomplete fields and widgets for zope.formlib", "version": "1.0a1" }, "last_serial": 792985, "releases": { "1.0a1": [ { "comment_text": "", "digests": { "md5": "90a7251312eff35f3f44d9f6f6ad56e7", "sha256": "56a6e58c8397e1a059390bab64d13a153adf13c7fe7e4558cf7ae6bd65c2946a" }, "downloads": -1, "filename": "horae.autocomplete-1.0a1.tar.gz", "has_sig": false, "md5_digest": "90a7251312eff35f3f44d9f6f6ad56e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6783, "upload_time": "2012-01-16T12:04:27", "url": "https://files.pythonhosted.org/packages/ac/22/09fc61addfdd9a48219092bf96fb795025422b19d0751e7c1652b42a2893/horae.autocomplete-1.0a1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "90a7251312eff35f3f44d9f6f6ad56e7", "sha256": "56a6e58c8397e1a059390bab64d13a153adf13c7fe7e4558cf7ae6bd65c2946a" }, "downloads": -1, "filename": "horae.autocomplete-1.0a1.tar.gz", "has_sig": false, "md5_digest": "90a7251312eff35f3f44d9f6f6ad56e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6783, "upload_time": "2012-01-16T12:04:27", "url": "https://files.pythonhosted.org/packages/ac/22/09fc61addfdd9a48219092bf96fb795025422b19d0751e7c1652b42a2893/horae.autocomplete-1.0a1.tar.gz" } ] }