Skip to content

kitzj/algoliasearch-django-example

 
 

Repository files navigation

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!

Instant-search

Auto-complete

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 59.1%
  • HTML 36.4%
  • CSS 4.5%