Skip to content
Myr

index.rst

This file

Path

docs/tutorial/index.rst

66 lines · 2.0 KiB

Last changed by

Not known.

History of this file

Take it

1.. _tutorial:23Tutorial4========56.. toctree::7    :caption: Contents:8    :maxdepth: 1910    layout11    factory12    database13    views14    templates15    static16    blog17    install18    tests19    deploy20    next2122This tutorial will walk you through creating a basic blog application23called Flaskr. Users will be able to register, log in, create posts,24and edit or delete their own posts. You will be able to package and25install the application on other computers.2627.. image:: flaskr_index.png28    :align: center29    :class: screenshot30    :alt: screenshot of index page3132It's assumed that you're already familiar with Python. The `official33tutorial`_ in the Python docs is a great way to learn or review first.3435.. _official tutorial: https://docs.python.org/3/tutorial/3637While it's designed to give a good starting point, the tutorial doesn't38cover all of Flask's features. Check out the :ref:`quickstart` for an39overview of what Flask can do, then dive into the docs to find out more.40The tutorial only uses what's provided by Flask and Python. In another41project, you might decide to use :ref:`extensions` or other libraries to42make some tasks simpler.4344.. image:: flaskr_login.png45    :align: center46    :class: screenshot47    :alt: screenshot of login page4849Flask is flexible. It doesn't require you to use any particular project50or code layout. However, when first starting, it's helpful to use a more51structured approach. This means that the tutorial will require a bit of52boilerplate up front, but it's done to avoid many common pitfalls that53new developers encounter, and it creates a project that's easy to expand54on. Once you become more comfortable with Flask, you can step out of55this structure and take full advantage of Flask's flexibility.5657.. image:: flaskr_edit.png58    :align: center59    :class: screenshot60    :alt: screenshot of login page6162:gh:`The tutorial project is available as an example in the Flask63repository <examples/tutorial>`, if you want to compare your project64with the final product as you follow the tutorial.6566Continue to :doc:`layout`.