Awesome
AlgoliaSearch Django Example
This is a Django application indexing 500 Contact
objects and providing auto-completion and instant-search samples. See algoliasearch-django package.
A Contact
is defined by:
- A name
- An email address
- A company name
An Algolia account is required to test it.
Dependencies
$ pip install algoliasearch-django
Installation
$ git clone https://github.com/algolia/algoliasearch-django-example
$ cd algoliasearch-django-example
$ python manage.py migrate
$ python manage.py createsuperuser
Configure the credentials
You can add your credentials in core/settings.py
or you can export them in your environment:
$ export ALGOLIA_APPLICATION_ID=XXXXX
$ export ALGOLIA_API_KEY=XXXXX
$ export ALGOLIA_SEARCH_API_KEY=XXXXX
Populate the DB and start indexing
$ python manage.py loaddata contacts.json
$ python manage.py algolia_reindex
Start the application
$ python manage.py runserver
Enjoy your http://localhost:8000
examples!