Skip to main content

Frontend-agnostic Django autocomplete utilities

Project description

https://travis-ci.org/novafloss/django-agnocomplete.svg?branch=master

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

The full documentation is browsable on RTFD

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.4, 3.5.

  • Django 1.8, 1.9, 1.10.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-agnocomplete-0.8.0.tar.gz (37.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

django_agnocomplete-0.8.0-py2-none-any.whl (16.3 kB view details)

Uploaded Python 2

django-agnocomplete-0.8.0.linux-x86_64.tar.gz (26.6 kB view details)

Uploaded Source

File details

Details for the file django-agnocomplete-0.8.0.tar.gz.

File metadata

File hashes

Hashes for django-agnocomplete-0.8.0.tar.gz
Algorithm Hash digest
SHA256 9ac9845a614421b1a399b688594337f6594b72d9920b00fe3cb0edef1e31f009
MD5 787ae2675a313013662c762aef9fac02
BLAKE2b-256 20797624abe923867d3255f43d4d2dcc9aa86101c165fb846fc53da1f263d98e

See more details on using hashes here.

File details

Details for the file django_agnocomplete-0.8.0-py2-none-any.whl.

File metadata

File hashes

Hashes for django_agnocomplete-0.8.0-py2-none-any.whl
Algorithm Hash digest
SHA256 2bcabf9731858963592c8b96e67b8b88dd904095c72ecfd79c3bd9e4acb1ae23
MD5 a5317ee4676eed57ed63f34560feb7dc
BLAKE2b-256 998c28dbe100daae15de832819be7ab3e8cdc22ae05ea2b585f4c69b152ee9e1

See more details on using hashes here.

File details

Details for the file django-agnocomplete-0.8.0.linux-x86_64.tar.gz.

File metadata

File hashes

Hashes for django-agnocomplete-0.8.0.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 86ead7e2b3aea83b348636acea556b51d0e5e8614e3d25e3a46b86b440ae089d
MD5 8926132412613e596cc5a09c1fe58201
BLAKE2b-256 ce3170babdb5fa52d9e84520734ae4264f8d0692702112eedc8e596a43242109

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page