{ "info": { "author": "Ronny Hendrawan", "author_email": "ronny.hendrawan@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 2.1", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries", "Topic :: Utilities" ], "description": "=======================\nTypeahead.js for Django\n=======================\n\n.. image:: https://travis-ci.org/xvronny/django-typeahead.svg?branch=master\n :target: https://travis-ci.org/xvronny/django-typeahead\n :alt: Continuous Integration\n\n.. image:: https://coveralls.io/repos/github/xvronny/django-typeahead/badge.svg?branch=master\n :target: https://coveralls.io/github/xvronny/django-typeahead?branch=master\n :alt: Test Coverage\n\n.. image:: https://img.shields.io/pypi/v/django-typeahead.svg\n :target: https://pypi.python.org/pypi/django-typeahead\n :alt: Latest PyPI version\n\n\nDjango thin wrapper for Twitter's `Typeahead.js `_ library.\n\n\nGoal\n----\n\nThe goal of this package is to seamlessly integrate Typeahead.js with Django and other django libraries.\n\n\nDocumentation\n-------------\n\nThe full documentation is at https://django-typeahead.readthedocs.io/\n\nRequirements\n------------\n\n* Python >= 3.4\n* Django >= 2.0\n* jquery >= 1.9\n\n\nInstallation\n------------\n\n1. Install using pip:\n\n ``pip install django-typeahead``\n\n2. Add ``bootstrap_typeahead`` to the list of ``INSTALLED_APPS`` in your ``settings.py`` file:\n\n .. code-block:: python\n\n INSTALLED_APPS = [\n # ...\n 'bootstrap_typeahead',\n ]\n\nThis installation instruction assumes you have jQuery already present in your page.\n\n\nExample\n-------\n\nThis sample section translates the `first example (basics) `_ sample from Typeahead.js `examples page `_.\n\nforms.py\n^^^^^^^^\n\nThe input widget ``TypeaheadInput`` would be used as a widget in Django forms.\n\n.. code-block:: python\n\n from django import forms\n from bootstrap_typeahead.widgets import TypeaheadInput\n\n class StateForm(forms.Form):\n query = forms.CharField(\n widget=TypeaheadInput(\n options={\n 'hint': True,\n 'highlight': True,\n 'minLength': 1\n },\n datasets={\n 'name': 'states',\n 'source': 'substringMatcher(states)',\n }\n )\n )\n\nThe ``options`` and ``datasets`` argument will be passed to the JavaScript typeahead instance,\nand are documented and demonstrated here:\n\n* `Typeahead Documentation `_\n* `Bloodhound Documentation `_\n* `Interactive Demo `_\n\ntemplate.html\n^^^^^^^^^^^^^\n\nThe initialization of suggestions list should be added to the page - in this case we are using snippet from `basic example `_ from Typeahead.js demo page.\n\n.. code:: Django\n\n {% load bootstrap4 %}\n\n {# Load CSS and JavaScript #}\n {% bootstrap_css %}\n\n {% block extra_css %}\n {{ form.media.css }}\n {% endblock %}\n\n
\n {% csrf_token %}\n {% bootstrap_form form %}\n
\n \n
\n
\n\n {% bootstrap_javascript jquery='full' %}\n\n {% block extra_js %}\n \n {{ form.media.js }}\n\n {% endblock %}\n\nHere we use `django-bootstrap4 `_ but you can create your HTML forms manually.\n\nLicense\n-------\n\nYou can use this under MIT License. See `LICENSE `_ file for details.\n\nBugs and Suggestions\n--------------------\n\nIf you have found a bug or if you have a request for additional functionality, please use the issue tracker on GitHub.\n\nhttps://github.com/xvronny/django-typeahead/issues", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/xvronny/django-typeahead.git", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/xvronny/django-typeahead/", "keywords": "django-typeahead", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "django-typeahead", "package_url": "https://pypi.org/project/django-typeahead/", "platform": "", "project_url": "https://pypi.org/project/django-typeahead/", "project_urls": { "Download": "https://github.com/xvronny/django-typeahead.git", "Homepage": "https://github.com/xvronny/django-typeahead/" }, "release_url": "https://pypi.org/project/django-typeahead/1.0.1/", "requires_dist": null, "requires_python": "", "summary": "Django app to add Typeahead.js based input elements.", "version": "1.0.1" }, "last_serial": 4629639, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "4368cf94e437c949df68d70af405f9b0", "sha256": "baa23fa73e3c355c1dc0df9b9bae2225119ba79768bfe37f536d8da68eaf4a6f" }, "downloads": -1, "filename": "django-typeahead-1.0.0.tar.gz", "has_sig": false, "md5_digest": "4368cf94e437c949df68d70af405f9b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8395, "upload_time": "2018-12-23T11:32:13", "url": "https://files.pythonhosted.org/packages/f0/a8/53a6b228f41cfae39e6e972fa236f1a0a78ded71b7eefbef6cccbde24bb1/django-typeahead-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "4213c3ffed479ee07d2992233673470e", "sha256": "064656588ebb6cb56ea933210062efe657a119e8e8a3dbb6172722f99a8111f8" }, "downloads": -1, "filename": "django-typeahead-1.0.1.tar.gz", "has_sig": false, "md5_digest": "4213c3ffed479ee07d2992233673470e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8830, "upload_time": "2018-12-23T15:08:16", "url": "https://files.pythonhosted.org/packages/73/19/6d89d426db9c7d6bf1e235e5f4e0617e5d658554c5ea74860211f63bef01/django-typeahead-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4213c3ffed479ee07d2992233673470e", "sha256": "064656588ebb6cb56ea933210062efe657a119e8e8a3dbb6172722f99a8111f8" }, "downloads": -1, "filename": "django-typeahead-1.0.1.tar.gz", "has_sig": false, "md5_digest": "4213c3ffed479ee07d2992233673470e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8830, "upload_time": "2018-12-23T15:08:16", "url": "https://files.pythonhosted.org/packages/73/19/6d89d426db9c7d6bf1e235e5f4e0617e5d658554c5ea74860211f63bef01/django-typeahead-1.0.1.tar.gz" } ] }