In the last entries, we have incrementally developed a very simple Django application that searched among a database of Simpsons quotes. To simplify the reading of these entries, I have enabled a Bitbucket repo with the source code: Go
This will be the last entry on the Simpsons quote search engine. In this entry we will add authentication; so the users of the REST API will need to have an account in order to use it. This will slightly change our communication protocol, since we will first have to authenticate.
In this new entry, we will continue our Simpsons quote search engine. Up to this point, we have been accessing only data created by the application. Now, we are going to access to a pre-existing database. This is a very important step, because it enables us to create an interface to a more complex data collection and processing system that uses other technologies to create the database.
In the last four entries, we have been getting to know Django and its basic use. We want to use Django to create a good data source that responds to simple queries. We have seen how to get the responses in HTML. Since HTML is a structured language, we can kind-of consider that the mission is accomplished. But to serve data, a better way is to return JSON files. In this entry, we will get to know the Django REST framework that helps in creating RESTful applications, that is what we are seeking.
In this new entry, we will go one step further in our Simpsons Quote database. In the last entry, we achieved some degree of interaction with the application. But in doing so, we mixed up HTML code with Python and crippled the security in Django. In this entry, we will solve both problems by introducing the use of HTML templates
In the previous entry, we created a simple Django app that returned random Simpsons quotes. The application was not interactive; that is, it did not really process the request from the client. In this entry, we will modify the previous application so it is interactive. Specifically, we will create a very simple search engine that returns the Simpson quotes that have a specific word in them.
In the previous entry we saw a theoretical approach to Django. We now set to create a first simple Django “Hello World” app. This app will just return a random Simpsons quote when we access a certain URL. This will help to see how to set up and configure the Django environment.
Python is not a novel language. Nevertheless, in the last couple of years, its popularity has risen together with the growth of data science. It is increasingly the language of choice for data scientists. So, what is the reason for this choice, given that there are languages and environments specifically designed for this purpose, such as R, Matlab or Octave?