Learn Flask for Python – Full Tutorial


Flask is a micro web framework written in Python. It is classified as a microframework because it does not require particular tools or libraries. Learn how to use it in this crash course tutorial.


Tutorial from Jake Rieger. Check out his YouTube channel:

Learn to code for free and get a developer job:

Read hundreds of articles on programming:

And subscribe for new videos on technology every day:

Nguồn: https://sangoivon.vn

Xem thêm bài viết khác: https://sangoivon.vn/game/


  1. Why when I import SQLAlcehmy from flask_sqlalchemy it says module not found when in my env I have it installed?

  2. thank you for the great tutorial! there're couple questions if anyone can please help, I accidentally added a task without any content, it worked, thought since in class Todo() content=(nullable=False), it shouldn't let me do that, right? also changed db.String(200) to db.String(5) to test it out, but it let me add text more than 5 characters, why? thank you again in advance!

  3. Hey all, I was having difficulty with my CSS not loading even after I updated it. The solution is to hard refresh because for some reason flask will save your style settings with caching. Try CTRL-Shift-R and hopefully that can solve your issue as well. 🙂

  4. How can i run an infinite loop in the background? I want to be able to manipulate it via the flask server but with threading either flask isnt starting the server or my loop doesnt works …

  5. Anyone got the code for the CSS page? In the video the top section was cut off and my page doesn't have the same style as in the tutorial

  6. can you create tutorial on simple user management system in flask something like this ————————-
    I have the following tables:

    Table name= group Attributes:

    id name

    Here simply the group is created.
    Table name = group permission

    Attributes: id group_id Permission_id

    Here simply the permission for the group is assigned
    Table name =permission
    Attributes: id name code name

    Here permission is created Table name =user Attributes: id username password

    Here the user is created

    Table name =user_groups
    Attributes: Id User_id Group_id

    Here the group for the user is assigned and all the permission inside this group should also be assigned to that user
    Table name =user_permission
    Attributes: Id User_id Permission_id

    Here the user might get more permission other than the permission assigned from the group.

    For example, if the user has only access for reading and writes from it’s defined group then if the admin user wants then he/she can directly assign permission to access a certain menu to the specific user without assigning to the other user of the same group.

    I haven't seen anyone on youtube have done this stuff

  7. hi i am stuck in the part when we are supposed to create a database.
    >>> from app import db
    /Users/yoshisam/Documents/Flaskintroduction/env/lib/python3.8/site-packages/flask_sqlalchemy/__init__.py:812: UserWarning: Neither SQLALCHEMY_DATABASE_URI nor SQLALCHEMY_BINDS is set. Defaulting SQLALCHEMY_DATABASE_URI to "sqlite:///:memory:".

    can anyone help me? thankyou

  8. For windows users: Activating virtual env: Go to Start -> Search PowerShell (Run as ADMIN) -> Run command: Set-ExecutionPolicy Unrestricted -Force -> Come back to VS Terminal, type: envScriptsactivate

  9. from app import db is showing error that cannot import db from app
    doing this on windows
    can anybody help with this?

  10. 8:23 kinda stuck at this point.. I did exactly as you did up to this point (in Windows) but when I type 'python3 app.py' it doesn't do anything at all.

  11. Really good tutorial. I am a beginner in flask and I must say the lecture is really insightful covering all the topics in one go.

  12. Really Useful. I created an app which is running successfully in my local but getting below error while running from heroku:

    Internal Server Error

    The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
    Let me know if you are familiar with this.

  13. Holy cow! This has been a lifesaver. I got about a quarter way through Cory Schafer's flask series and was completely lost. It's a bit hard to tell the essentials apart from stylistic design choices and I just felt like I was struggling to memorize huge chunks of code. This tutorial is way more bare bones; but that's a great advantage it has over other tutorials as I'm really getting the no-nonsense core ideas about flask out of this. Great stuff!

  14. Struggling with this tutorial as someone who's new to Flask. He doesn't explain any of these steps and is just kind of messing about – going back and forth and figuring out an app by himself. Maybe it's entertaining to watch if you're already familiar with this stuff, but it does nothing for a beginner.

  15. while adding a new task , even if we leave the input field "content" empty , the task is added with empty string.Maybe "nullable=False" is not working. Could you suggest some other validation, please?

  16. jinja2 exceptions templatenotfound: index.html
    not sure where the problem is when I do the same, have tried to modify return with full dir but no luck


Please enter your comment!
Please enter your name here