Skip to content
Myr

index.rst

This file

Path

docs/tutorial/index.rst

64 lines · 2.0 KiB

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than 65b0eef point at it.

Merge pull request #4500 from pallets/release-2.1.0David Lordbefore adoption65b0eef

lines 1–64why, one step back
1Tutorial
2========34.. toctree::5 :caption: Contents:6 :maxdepth: 178 layout9 factory10 database11 views12 templates13 static14 blog15 install16 tests17 deploy18 next1920This tutorial will walk you through creating a basic blog application21called Flaskr. Users will be able to register, log in, create posts,22and edit or delete their own posts. You will be able to package and23install the application on other computers.2425.. image:: flaskr_index.png26 :align: center27 :class: screenshot28 :alt: screenshot of index page2930It's assumed that you're already familiar with Python. The `official31tutorial`_ in the Python docs is a great way to learn or review first.3233.. _official tutorial: https://docs.python.org/3/tutorial/3435While it's designed to give a good starting point, the tutorial doesn't36cover all of Flask's features. Check out the :doc:`/quickstart` for an37overview of what Flask can do, then dive into the docs to find out more.38The tutorial only uses what's provided by Flask and Python. In another39project, you might decide to use :doc:`/extensions` or other libraries40to make some tasks simpler.4142.. image:: flaskr_login.png43 :align: center44 :class: screenshot45 :alt: screenshot of login page4647Flask is flexible. It doesn't require you to use any particular project48or code layout. However, when first starting, it's helpful to use a more49structured approach. This means that the tutorial will require a bit of50boilerplate up front, but it's done to avoid many common pitfalls that51new developers encounter, and it creates a project that's easy to expand52on. Once you become more comfortable with Flask, you can step out of53this structure and take full advantage of Flask's flexibility.5455.. image:: flaskr_edit.png56 :align: center57 :class: screenshot58 :alt: screenshot of edit page5960:gh:`The tutorial project is available as an example in the Flask61repository <examples/tutorial>`, if you want to compare your project62with the final product as you follow the tutorial.6364Continue to :doc:`layout`.