Making Flask backend-ready
In the Setting up the development environment with Flask section of Chapter 1, Getting Full Stack Ready with React and Flask, we set up the development environment for the Flask server. Ensure your virtual environment is activated. You can do so by running the following commands:
- For Mac/Linux:
source venv/bin/activate
- For Windows:
Venv/Scripts/activate
Your virtual environment should now be activated, and your terminal prompt should be prefixed with the name of the virtual environment (for example, (
venv) $
).
Next, let’s dive straight into defining an event registration route, with its function as part of the requirements for Bizza application model.
Let’s add a model to handle registrations for event attendees. You will later use it to accept requests from the React frontend in the next section, where we will handle form inputs in React and Flask.
The app.py
file in the root directory of your application is still...