Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Simple Django and ElasticSearch Tutorial

![OpenCrowd][1] [1]:


  1. An ElasticSearch instance
  2. Python & Django >= 1.4


  1. Clone this repo

git clone git://

  1. Create the ElasticSearch type mappings

python put_mappings

  1. Run the server

python runserver

  1. Point your browser at http://localhost:8000/simple/

How It Works

The project's views are defined in The functions that query and store data into ElasticSearch are defined in; these are purposefully kept minimal.

This project barely uses the Django ORM -- it uses it for the django.contrib.auth User model. By default, it uses sqllite3 for this; you can (and should) configure it to point at an appropriate database configuration.

You can control the ElasticSearch index and connection via the ELASTICSEARCH_URL and ELASTICSEARCH_INDEX variables in These default to 'http://localhost:9200' and 'blog' respectively.

The only "fancy" thing that this tutorial app does beyond ElasticSearch CRUD-type operations is using akismet for spam detection for comments. You should put your akismet key information in the apikey.txt file. If you don't want to use akismet, you can disable that in defining USE_AKIMSET as False.

The web templates are kept purposefully simple, using bare minimum bootstrap functionality.


A simple tutorial, showing how to quickly and easily use ElasticSearch as the data store for a simple application (in this case a simple blogging engine)



No releases published


You can’t perform that action at this time.