Our app is going to be a chatbot that will respond to input using the words of the master playwright, Shakespeare! First, we'll load a simple Django instance's database with the complete text of Shakespeare; next, we'll write our route to search the database for text that matches; finally, we'll create our React app to be the conduit between the user and the Django backend. We won't get fancy with our Python—no machine learning or complex language processing awaits us, though you could always take our bot one step further if you'd like!
Note that we'll be using Python 3. For more detailed information about installing and setting up Django, including use of virtual environments, visit the official documentation at https://docs.djangoproject.com/en/3.0/topics/install/.
To begin, let's set up Django using the following steps:
- Create a new virtual environment: python -m venv shakespeare.
- Start the...