Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daxslab/web2py-typeahead
typeahead.js autocomplete widget for web2py
https://github.com/daxslab/web2py-typeahead
Last synced: 17 days ago
JSON representation
typeahead.js autocomplete widget for web2py
- Host: GitHub
- URL: https://github.com/daxslab/web2py-typeahead
- Owner: daxslab
- License: mit
- Created: 2016-02-11T15:43:44.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-11T16:10:00.000Z (almost 8 years ago)
- Last Synced: 2024-07-31T20:48:01.314Z (5 months ago)
- Language: Python
- Size: 43 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- cuban-opensource - web2py-typeahead
README
# web2py-typeahead
typeahead.js autocomplete widget for web2pyInstallation
============- Download The plugin installer (.w2p file) and install it via the web2py interface.
Usage
=====```python
from plugin_typeahead.typeahead import TypeheadWidgetform = SQLFORM.factory(
Field(
'my_field_name',
widget=TypeheadWidget(
request, # web2py request object
db.table.field, # field for autocomplete search
id_field=db.table.id, # use it for reference fields, id field to submit (default: None)
query=db.table.field.contains('husky'), # custom query for suggestions (default: None)
limitby=(0, 10), # limit suggestion count (default: (0, 10))
min_length=2, # min length for popup suggestions (default: 2)
prefetch=True, # Use typeahead.js prefetch (default: True)
remote=True, # Use typeahead.js remote (default: True)
)
)
)```