Tutorial

Contents:

This tutorial will walk you through creating a basic blog applicationcalled Flaskr. Users will be able to register, log in, create posts,and edit or delete their own posts. You will be able to package andinstall the application on other computers.

screenshot of index page

It’s assumed that you’re already familiar with Python. The officialtutorial in the Python docs is a great way to learn or review first.

While it’s designed to give a good starting point, the tutorial doesn’tcover all of Flask’s features. Check out the Quickstart for anoverview of what Flask can do, then dive into the docs to find out more.The tutorial only uses what’s provided by Flask and Python. In anotherproject, you might decide to use Extensions or other libraries tomake some tasks simpler.

screenshot of login page

Flask is flexible. It doesn’t require you to use any particular projector code layout. However, when first starting, it’s helpful to use a morestructured approach. This means that the tutorial will require a bit ofboilerplate up front, but it’s done to avoid many common pitfalls thatnew developers encounter, and it creates a project that’s easy to expandon. Once you become more comfortable with Flask, you can step out ofthis structure and take full advantage of Flask’s flexibility.

screenshot of login page

The tutorial project is available as an example in the Flaskrepository, if you want to compare your projectwith the final product as you follow the tutorial.

Continue to Project Layout.