Python Flask Beginner Tutorial - Todo App - Crash Course

Поділитися
Вставка
  • Опубліковано 25 жов 2024

КОМЕНТАРІ • 113

  • @newsjuice7404
    @newsjuice7404 2 роки тому +4

    It was awesome thanks a lot just a little input in for loop if you replace{{ todo.id }}with {{loop.index}} it ll automatically update the indices if you delete any in the middle or top

  • @popcycleism
    @popcycleism 2 роки тому +2

    This was very satisfying. The topping was your introduction to Semantic UI giving more possibilities from using bootstrap. Now to learn how to upload photos! Thank you for this tutorial.

  • @goodgrow_io
    @goodgrow_io 4 роки тому +5

    This video is amazing. Best guide I've seen so far.

  • @syedmuhammadraza9534
    @syedmuhammadraza9534 3 роки тому +2

    Just completed this TODO-APP really helpful appreciated!

  • @LearnBr0
    @LearnBr0 9 місяців тому

    Thanks Patrick! I'm starting with Python and found your tutorial quite useful. Keep up the good content 👏

  • @sphinxzgamingofficial
    @sphinxzgamingofficial 2 роки тому +1

    I love the Semantixc UI! It is very easy to style the page! And I liked your video as well and subscribed! Amazing content! Keep it up the good videos! It helps on my programming ❤️🙏

  • @KeyserTheRedBeard
    @KeyserTheRedBeard 2 роки тому +1

    impressive upload Python Engineer. I killed that thumbs up on your video. Continue to keep up the exceptional work.

  • @hakusho04
    @hakusho04 3 роки тому

    exactly what i need to start my flask journey thanks

  • @gillarajieprasatya812
    @gillarajieprasatya812 3 роки тому

    i dont know why, but i now im falling in love with flask

  • @crazyGodLikE
    @crazyGodLikE 3 роки тому +1

    I like your pace and you explain concepts well. Thank you.

  • @rishabkumar9578
    @rishabkumar9578 4 роки тому +1

    You are a Gem in a bag of rocks Mr.Python !!!

  • @wamiqmushtaq2825
    @wamiqmushtaq2825 8 місяців тому

    Patrick would love u to do a separate tutorial on using flask sql alchemy, it is much needed!!

  • @mohammedchoupaqee5530
    @mohammedchoupaqee5530 Рік тому

    It is an excellent course tutorial with professional Engine Good Luck ,

  • @I_am_pradeep
    @I_am_pradeep 4 роки тому +3

    Great tutorial. Very Helpful. Thank You So Much!

  • @papasmoke3311
    @papasmoke3311 2 роки тому +5

    One thing i don’t understand is: why does he create a new database every time the program gets run. wouldn’t it be better to check if a db exists?

  • @adaum79
    @adaum79 2 роки тому

    Perfect! Simple and clear, like always.

  • @mctosima
    @mctosima 2 роки тому +2

    As of Flask-SQLAlchemy 3.0, all access to db.engine (and db.session) requires an active Flask application context. db.create_all uses db.engine, so it requires an app context.

    • @ashiwal9910
      @ashiwal9910 2 роки тому

      I am stuck there can u pls guide me?

    • @gokulkrishnan4721
      @gokulkrishnan4721 Рік тому +1

      @@ashiwal9910 Just above db=SQLAlchmey (app)
      add this line: with app.app_context():
      -> By doing this you will get instance folder 📁 in that you can see .db file
      -> If you don't want to do this just use SQLAlchmey version 2.5.1 (pip install flask-SQLAlchemy==2.5.1) you can easily push data from the python shell
      (ex: >>> from app import db
      >>> db.create_all()
      )
      I hope this helps you :(

    • @princeakpolo1074
      @princeakpolo1074 Рік тому +4

      just above -> app = Flask(__name__)
      add this line below it: app.app_context().push()

  • @bryanchambers1964
    @bryanchambers1964 2 роки тому +2

    I'm very confused right from the start (1:45). Where are you entering:
    git mkdir flask-todo
    I think its just in your terminal right? I did this in my terminal and it says 'mkdir is not a command'. I installed 'git' too so I don't understand this. If take out 'git' and just enter 'mkdir flask-todo' it works but my "Hello World" website doesn't work in the following steps.

  • @joeygaller8761
    @joeygaller8761 Рік тому +2

    GOOD DAY SIR
    I MAY BE HAVING A PROBLEM ON THE DB_SQLITE TABLE
    I WONT AUTOMATICALLY CREATE ANOTHER FOLDER
    I FOLLOW ALL YOUR INSTRUCTIONS BUT IT WONT JUST CREATE ANOTHER FOLDER AND JUST HAVE AN ERROR

  • @muhammadzubairbaloch3224
    @muhammadzubairbaloch3224 4 роки тому

    dil khush kar detay ho bhai. really nice work.

  • @creyssu
    @creyssu 3 роки тому

    Bro you help me a lot with the flaskAlchemy, thank you !

  • @crystal-arts-1
    @crystal-arts-1 2 роки тому

    Thank you for the awesome tutorial!

  • @swoopsavvy7560
    @swoopsavvy7560 Місяць тому

    @TheAmazinRaven, Really great, you solved it!!!!

  • @malcolmrichardson
    @malcolmrichardson 2 роки тому

    Thank you! Great tutorial!

  • @itsblueworld3591
    @itsblueworld3591 2 роки тому

    A very well explained tutorial, totally understandable..

  • @aidangasim
    @aidangasim 4 роки тому +1

    its amazing,useful concise and clear,i am eternally thankful ))

    • @patloeber
      @patloeber  4 роки тому

      Thank you! Glad you like it :)

  • @ombrebyaarti3024
    @ombrebyaarti3024 2 роки тому

    Thanks for sharing…it help to improve.

  • @liker2356
    @liker2356 3 роки тому

    Amazing video helped a lot!!

  • @cngetich37
    @cngetich37 2 роки тому

    Great Tutorial

  • @kshitijgupta6175
    @kshitijgupta6175 3 роки тому +2

    In my system, VSCode doesn't show it just shows [] this. Any suggestions how to tackle this problem?

  • @alexandergdansk
    @alexandergdansk 2 роки тому

    Super!
    Thanx for it!

  • @junivensaavedra882
    @junivensaavedra882 2 роки тому

    Excellent content. Thank you very much. :D

  • @aryakrishna4932
    @aryakrishna4932 3 роки тому

    awesome tutorial ! thanks for this!

    • @patloeber
      @patloeber  3 роки тому +1

      thanks for watching!

  • @ammarsajjid8258
    @ammarsajjid8258 2 роки тому

    Thank You for the video.

  • @gowthambhat1498
    @gowthambhat1498 2 роки тому

    great tutorial

  • @mateen161
    @mateen161 4 роки тому

    Very helpful content. Thank you!

  • @dhineshbabu9376
    @dhineshbabu9376 4 роки тому

    Awesome Tutorials.. Simple and Neat .. :)

  • @PythonDevelopment
    @PythonDevelopment 2 роки тому

    This greate content! Awesome

  • @ssk-ct7cr
    @ssk-ct7cr 2 роки тому

    Very good tutorial! I wish to add the functionality of deleting all the items at once by the click of a button ('Clear todos', for example). Does someone know how I could do this?

  • @bryanchambers1964
    @bryanchambers1964 2 роки тому

    Could you mind please explain why you Visual Studio instead of say Jupyter. I tried following this in a Jupyter notebook but the program crashed and couldn't create a web page. It would have been helpful if you gave a little explanation about why you are using Visual Studio and whether it must be done exactly like that. I did everything the same way in visual studio and got the same error again.

  • @ashishbhardwaj8609
    @ashishbhardwaj8609 Рік тому +1

    Hello Sir. Great tutorial, especially for a beginner. I created the app following the tutorial, but, when I tried deploying it using Vercel, it showed "500 Internal Server Error". However, it works perfectly fine when I tested it using the terminal on my local server... Please provide guidance

  • @SA-oj3bo
    @SA-oj3bo 3 роки тому +1

    Thanks, but how to deploy to a cloud server?

  • @OmaimaHasan
    @OmaimaHasan 11 місяців тому

    Hey, i was following along up until adding a database. SQLAlchemy was installed but now its not working when i run the app.py file

    • @OmaimaHasan
      @OmaimaHasan 11 місяців тому

      its saying that RuntimeError: Working outside of application context.

  • @eccomi21
    @eccomi21 3 роки тому +1

    Thanks for the tutorial!
    However im running into a slight issue.
    Im using pycharm as my IDE. i was not able to install FlaskSQLAlchemy the normal way. it would throw an error. So i had to resort to using the command
    "python -m easy_install SQLAlchemy"
    So i managed to install it with that command, but now despite it being in the right venv, showing in the list and all when trying to import it it throws the following error:
    "No module named 'flask_sqlalchemy'"
    Even after googling, all the answers i found that matched my IDE and OS (being win10) i still cant figure out what the problem is.
    Do you have any idea what the problem could be?

    • @eccomi21
      @eccomi21 3 роки тому

      solved my own question. make sure to follow his tutorial letter by letter. theres two different flask sql alchemy packages.

  • @akashpardeshi5721
    @akashpardeshi5721 2 роки тому

    I'm stuck on one error Windows is not support crypt any Idea how to solve it? I'm using VS Code and Windows 10

  • @THOMASKUTTYREJI
    @THOMASKUTTYREJI 3 роки тому

    thank you so much .... an amazing video...

  • @himanshushukla787
    @himanshushukla787 3 роки тому

    Hey man nice tutorial. I made the app by following the tutorial
    but in my app the title of the todo always says title instead of the title that I put in to the text box and I can't figure out what is wrong.

  • @TheFuentes5551
    @TheFuentes5551 4 роки тому

    I do have to ask a question. What is better to learn Flask or Django? Expecialy for begginer

    • @patloeber
      @patloeber  4 роки тому +3

      It depends on what you want to do. Both are great frameworks. Flask is more lightweight and easier for beginners. However, if you want an app with user management/authentication, then I would go with Django since it takes care of a lot of things for you.

    • @TheFuentes5551
      @TheFuentes5551 4 роки тому

      @@patloeber the only reason I ask is because I saw online many advice Django because its easy and very powerful. And as you said Django does does a lot of things for you.
      So now as a noob i dont know on which to focus on? Or maybe I should learn both?
      I did saw all your videos and they did help me a lot by the way. I have good understandings of "intermediate" Python skills

  • @efeakaroz6686
    @efeakaroz6686 4 роки тому

    I love your vid. Also what is your vscode theme

    • @patloeber
      @patloeber  4 роки тому

      Thanks! It's the night owl theme...

  • @harryayce11
    @harryayce11 2 роки тому

    What about implementing "create","delete" etc in an async manner?

  • @emmachuksudeji9477
    @emmachuksudeji9477 2 роки тому

    thanks again

  • @prajwalm.s7976
    @prajwalm.s7976 Рік тому

    At 14:32 I am getting this error - File "F:\flask-todo\venv\lib\site-packages\werkzeug\local.py", line 508, in _get_current_object
    raise RuntimeError(unbound_message) from None
    RuntimeError: Working outside of application context.
    This typically means that you attempted to use functionality that needed
    the current application. To solve this, set up an application context
    with app.app_context(). See the documentation for more information.

    • @shobbyduncan1607
      @shobbyduncan1607 5 місяців тому

      did yyou manage?....i still have the same error

  • @rachit6099
    @rachit6099 4 роки тому

    Thankyou for this video just wanted to know which theme are you using for visual studio code

    • @patloeber
      @patloeber  4 роки тому

      Have a look at my newest video :) There I show my VS Code setup. It's the night owl theme

  • @abdullah-sx2qf
    @abdullah-sx2qf 2 роки тому

    Hey, how would I make it so each user that logins in has their own task app?

  • @sakshisaxena8913
    @sakshisaxena8913 3 роки тому +1

    any tutorial on flask with Postgres sir?

    • @novaria
      @novaria 3 роки тому

      SQLalchemy allows you to simply connect to a postgreSQL database AFAIK.

  • @Stone8age
    @Stone8age 4 роки тому

    Nice job dude, any plans for a django one?

    • @patloeber
      @patloeber  4 роки тому +2

      Django crash course is on my list too :)

  • @shreyashimukhopadhyay6354
    @shreyashimukhopadhyay6354 4 роки тому

    Could you please also show how to build Machine learning Apps using flask..

    • @patloeber
      @patloeber  4 роки тому +2

      Yes, I do have one more with pytorch and flask right now...

  • @bryanchambers1964
    @bryanchambers1964 2 роки тому

    Why whenever I try to learn stuff like this all I ever get are error messages and I never get the correct result even if I copy everything exact?

    • @ssk-ct7cr
      @ssk-ct7cr 2 роки тому

      Don't know which error you're having... I got an error related to context. With a slight code modification I got the result expected. I'm sending the code, in case you got the same error:
      Right at the end of the app.py file:
      if __name__ == '__main__':
      with app.app_context():
      db.create_all()
      app.run(debug=True)
      Hope it helps!

    • @bryanchambers1964
      @bryanchambers1964 2 роки тому +1

      @@ssk-ct7cr Thanks, I'll try that when I get a chance and let you know if it worked.

    • @ssk-ct7cr
      @ssk-ct7cr 2 роки тому

      @@bryanchambers1964 Great! ;)

  • @pavelow36
    @pavelow36 3 роки тому

    amazing

  • @shri1345
    @shri1345 3 роки тому

    Hey,I have a quite of an issue on kali linux saying that, directory not found when I try to use /venv/bin/activate

    • @patloeber
      @patloeber  3 роки тому

      maybe on linux the command is slightly different than on Mac

    • @shri1345
      @shri1345 3 роки тому

      No actually I found out that the files were hidden
      .But now it works ;)

  • @I_am_pradeep
    @I_am_pradeep 4 роки тому

    can you please tell me how to validate form in this ?

  • @anithapoly6849
    @anithapoly6849 3 роки тому

    How can this be done in sqlite3 database in pycharm

  • @railotrailot521
    @railotrailot521 4 роки тому +1

    Hi, where are u from ? interesting accent)))thanks a lot for good content!

  • @sawaito
    @sawaito Рік тому

    Lol, flask is a lot easier than django. I don't know why i'm learning django and not flask 🤨

  • @tamtonaquib
    @tamtonaquib 2 роки тому

    Lol tf was that voice

  • @jbruce87
    @jbruce87 Рік тому +1

    Not getting "db.sqlite" to create. I will post my code below. working on a Mac like the video. even tried adding the "with app.app_context():" that other commenters have suggested. no luck

    • @jbruce87
      @jbruce87 Рік тому

      from flask import Flask, render_template
      from flask_sqlalchemy import SQLAlchemy
      app = Flask(__name__)
      app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///db.sqlite'
      app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
      db = SQLAlchemy(app)
      @app.route('/')
      def index():
      # show all todos
      return render_template('base.html')
      if __name__== "__main__":
      with app.app_context():
      db.create_all()

      app.run(debug=True)

    • @jbruce87
      @jbruce87 Рік тому

      Now im getting this error:
      Traceback (most recent call last):
      File "/Users/jb/Desktop/PyFlaskAppThing/app.py", line 9, in
      class Todo(db.model):
      File "/Users/jb/Desktop/PyFlaskAppThing/venv/lib/python3.9/site-packages/flask_sqlalchemy/extension.py", line 988, in __getattr__
      raise AttributeError(name)
      AttributeError: model

    • @iamdavidmohan
      @iamdavidmohan Рік тому +1

      @@jbruce87
      Had the same problem.
      Clear the Flask package and the Flask-SQLAlchemy package --> I just cleared everything in the [environment]\Lib Folder which I installed since I started the tutorial
      Then Install
      pip install Flask==2.1.0
      pip install -Iv Flask-SQLAlchemy==2.5.1
      Using this Versions the DB was created

  • @princysingh1398
    @princysingh1398 Рік тому

    Get this error while activate env...someone help me out
    error:-
    PS C:\Users\THIS\Pictures\flask-todo> \Python27\Scripts\virtualenv.exe venv
    \Python27\Scripts\virtualenv.exe : The term '\Python27\Scripts\virtualenv.exe' is not recognized as the
    name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a
    path was included, verify that the path is correct and try again.
    At line:1 char:1
    + \Python27\Scripts\virtualenv.exe venv
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (\Python27\Scripts\virtualenv.exe:String) [], CommandNotF
    oundException
    + FullyQualifiedErrorId : CommandNotFoundException

  • @yusufsAnt31
    @yusufsAnt31 2 роки тому

    Great tutorial

  • @playgoods
    @playgoods 4 роки тому

    amazing

  • @shreyashimukhopadhyay6354
    @shreyashimukhopadhyay6354 4 роки тому +1

    Amazing tutorial! Thanks a lot!