Elastic Search with Kibana and Django – part 2

In previous part, we installed Elasticsearch and Kibana. Now we will create a Django project and will link the elastic search with the project.

Django Project:

You can follow the official Django tutorials to create and start a Django project.  Or you follow below steps. We will be following the official documentation, but only the necessary steps.

– Make sure python 3 is installed on your machine. Although not mandatory but it is recommended to use virtual environment.

Install Django. Setup a database. We will be using MySQL.

– Create a project.
$ django-admin startproject elasticsearchdjango

– Change directory to elasticsearch. Create a new app ‘poll’.
$ python manage.py startapp polls

– If you are using virtual environment than install the dependencies using pip install -r req.txt  file after saving below lines in req.txt  file.

– Create a model in polls/models.py file.

Continue reading “Elastic Search with Kibana and Django – part 2”