Learn by example to develop an application with Python and Flask.
In this tutorial, we will create a simple blogging application. It only supports one user, only allows text entries, and has no feeds or comments.
While very simple, this example still features everything you need to get started. In addition to Flask, we will use SQLite for the database, which is built-in to Python, so there is nothing else you need.
If you want the full source code in advance or for comparison, check out the example source.
- Introducing Flaskr
- Step 0: Creating The Folders
- Step 1: Database Schema
- Step 2: Application Setup Code
- Step 3: Installing flaskr as a Package
- Step 4: Database Connections
- Step 5: Creating The Database
- Step 6: The View Functions
- Step 7: The Templates
- Step 8: Adding Style
- Bonus: Testing the Application