Frontend-agnostic Django autocomplete utilities
Project description
Heavily based on django-autocomplete-light v2 workflow and concepts, this toolkit offers a front-end agnostic way to get fields for autocompletion.
It will provide:
a simple and configurable entry-point management,
a REST-like HTTP API to search for results,
Fields and widgets that will make the interface between our Django code and your Javascript.
Status
Beta, used in production.
Install
$ pip install django-agnocomplete
Or add django-agnocomplete to your project requirements.
Documentation
Tests
Install tox in your environment (it could be a virtualenv) and run:
$ tox
It’ll run the tests for all the combinations of the following:
Python 2.7, 3.3, 3.4.
Django 1.8, 1.9.
and a flake8 check.
Are you a developer?
To target a specific test case, use the following:
$ tox -e py27-django18 -- demo.tests.test_core.AutocompleteChoicesPagesOverrideTest
Everything after the double-dash will be passed to the django-admin.py test command.
If you need to install a debugger (let’s say ipdb), you can use the TOX_EXTRA environment variable like this:
$ TOX_EXTRA=ipdb tox -e py27-django18
Run the demo
The (draft) demo site can be browsed using the Django devserver. Run:
$ make serve
It will run a syncdb (it may ask you questions) and then a runserver with your current demo.settings. You can browse the (very rough) website at http://127.0.0.1:8000/. You can add any runserver options you want using the tox positional parameters, like this:
$ tox -e serve -- 9090 # to change the listening port
Here you’ll be able to see that django-agnocomplete has been easily and rapidly integrated with selectize.js, select2, jquery-autocomplete and typeahead. With the same backend, you can plug the JS front-end you want.
Troubles running the demo?
This demo project is not build as a production-ready application, models can change, but there’s no migration in it. If you have database errors, you can try to remove it using:
$ make clean-db
Or, for more radical cleanup:
$ make clean-all
License
This piece of software is being published under the terms of the MIT License. Please read the LICENSE file for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for django-agnocomplete-0.7.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b91b3d2affd3c744f9199a592f1c263df87a150df55365261910944466ef7c6 |
|
MD5 | 30164d71b51dcf5b7d2ffcda24eccd7c |
|
BLAKE2b-256 | f5f5cc61b17a650326594cda7865fac5b6231f00139a34533bff2a91a962ef76 |
Hashes for django_agnocomplete-0.7.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8754d281c50a00a31b5cada1001d006c9b654e5eba3adb994642c5faa8f0db8e |
|
MD5 | aa28b68be551974940ca559ab2986f37 |
|
BLAKE2b-256 | 6950600b155acf23d4abc2c9e68dfc08737f822e8265e1d641f11e961d15e953 |
Hashes for django-agnocomplete-0.7.0.linux-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d644990cee505cd9a98839d6ab47f4f56aea1d5cb6d5278a5ba0b8caa20b318 |
|
MD5 | a8d442c313149c85f8662deba851737d |
|
BLAKE2b-256 | e5417d01449f593a0c8509ac13428266dafef5bd61c4d5e6befa134ec0999ca5 |