Learn Flask for Python - Full Tutorial

  Рет қаралды 1,907,468

freeCodeCamp.org

freeCodeCamp.org

Күн бұрын

Пікірлер: 1 400
@BrentBrewington
@BrentBrewington 3 жыл бұрын
Love that you walk through completely end to end - from installing prerequisite tools all the way through. Sometimes the initial install/setup stuff is the hardest part
@piewpok3127
@piewpok3127 5 ай бұрын
truee !!!!
@czar_iwnl
@czar_iwnl 3 ай бұрын
agree
@arturoroche3782
@arturoroche3782 3 жыл бұрын
08:53 render_template 10:02 template inheritance 12:58 CSS 15:36 SQL Alchemy 20:35 div 22:25 Make a textbox and a button 24:50 Methods
@davinsutanto
@davinsutanto 2 жыл бұрын
OK
@marmeladovsvid
@marmeladovsvid 2 жыл бұрын
"20:35 div" HAHAHAHHA bro
@circrna
@circrna 3 жыл бұрын
Excellent! 6:04 Install Requirements 6:53 First app 8:55 Static content, introduction 13:00 CSS 15:36 Databases 19:38 Setting up a database (use 'flask shell' at terminal to activate interactive shell if running it from terminal). And run the commands there. 22:19 Adding methods to 'route' in app file 34:00 Delete code is done; Updating code start here.
@TechWithTim
@TechWithTim 5 жыл бұрын
Congrats on 1 million subs!
@Crucizer
@Crucizer 5 жыл бұрын
and no one recognized you here?
@jheave
@jheave 4 жыл бұрын
Hi tim
@kromydas5063
@kromydas5063 4 жыл бұрын
hi tim your tutorials are so nice :)⠀⠀⠀⠀⠀⠀ ⣰⣿⣿⣿⣿⢢⣶⣄⡀⁣ ⠀⠀⠀⠀⣀⣐⠻⣿⣿⡿⢣⣿⣿⣿⣿⡆⁣ ⠀⠀⠀⣰⣿⣿⣿⣶⣍⡁⢿⣿⣿⣿⡟⣰⣷⣄⁣ ⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣷⡮⣿⢏⣼⣿⣿⣿⣷⁣ ⠀⣼⣿⣿⣿⣿⡟⠿⣿⣿⠟⠁⢋⣾⣿⣿⣿⡟⣱⣦⡀⁣ ⣼⣿⣿⣿⣿⣿⣁⠀⠀⠀⠀⠀⣿⣿⣿⡿⢋⣾⣿⣿⣿⁣ ⠘⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠈⠻⠟⣵⣿⣿⣿⢟⠁⁣ ⠀⠈⢿⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀⠈⠻⣿⠟⣡⣿⁣ ⠀⠀⠈⢻⣿⣿⣿⣿⣿⣿⣿⡀⠀⣿⣶⣤⣠⣾⣿⡟⁣ ⠀⠀⠀⠀⠻⣿⣿⣿⣿⣿⣿⣷⢠⣿⣿⣿⣿⣿⡟⁣ ⠀⠀⠀⠀⠀⠹⣿⣿⣿⣿⣿⣿⣾⣿⣿⣿⣿⡿⠁⁣ ⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⢿⣿⣿⣿⣿⣿⣿⠁⁣ ⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣷⡌⢉⣽⣿⣿⡇⁣ ⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⡇⣸⣿⣿⣿⡇⁣ ⠀⠀⠀⠀⠀ ⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⡇⁣ ⠀⠀⠀⠀⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ (edit) : thx for 2 likes I never got a like before :))))))))
@senthilkumarsundaravinayag9809
@senthilkumarsundaravinayag9809 4 жыл бұрын
Alert everybody The big Tim guy is HERE!!!!
@vikalpjain1098
@vikalpjain1098 4 жыл бұрын
Just subscribed because of Tim
@cat47
@cat47 4 жыл бұрын
15 minutes in and he's already showing us how to work with databases. THIS GUY IS AWESOME
@N3fario
@N3fario 5 жыл бұрын
I like the pace and the fact that there's no fluff words. Though, this isn't really a 'learn Flask' video, this is a "Type as you follow along as he *kind of* explains what's going on" type video.
@N3fario
@N3fario 5 жыл бұрын
If your table is blank when you first make it, add a border=1 attribute to the table tag so,
@pavloaleksyeyev5065
@pavloaleksyeyev5065 4 жыл бұрын
virtualenv install for windows 10: open up terminal in VS Code 1)pip install --upgrade virtualenv press enter 2) virtualenv env press enter 3) virtualenv \path\to\env\Scripts\activate press enter For windows 10 you must use 'virtualenv ...' to run commands. Example: 'virtualenv \path\to\env\bin\activate' to activate.
@hassanwehbi6324
@hassanwehbi6324 2 жыл бұрын
habibi u saved my life
@karthikpuvvula
@karthikpuvvula 2 жыл бұрын
thank you !!
@kunalrajput2234
@kunalrajput2234 Жыл бұрын
Thank you odin
@No_name-lq2ww
@No_name-lq2ww 11 ай бұрын
3) For windows 10 just run ' \path\to\env\bin\activate' without virualenv command
@CozyCoupons_
@CozyCoupons_ 11 ай бұрын
after that if you guys encounter any error like this (execution_policies or running scripts is disabled on this system) 1) use this commend: set-Executionpolicy -scope process -Executionpolicy Bypass run the above commend 2) after that use this commend: .\Activate (or) Activate
@MeetSinojia7
@MeetSinojia7 4 жыл бұрын
Exactly what I needed! Covers complete flask basics for a simple CRUD application (Todo list) in 45 minutes.
@darwishds1459
@darwishds1459 2 жыл бұрын
" Error while activating virtual environment in Windows 10 PowerShell " ??? If you are running Windows, then navigate to \Scripts, where is the name of your virtual environment. Then, execute the following command: set-Executionpolicy -Executionpolicy Remotesigned -Scope CurrentUser Type activate and press return. You will now be able to use your virtual environment.
@oferl15
@oferl15 Жыл бұрын
not working from cmd. Open Powershell as Administrator and run the command: it works
@snigdhapeddi8528
@snigdhapeddi8528 Жыл бұрын
@@oferl15 after routing to the above mentioned path type in .\activate in VS code terminal to activate the environment
@490o
@490o 3 жыл бұрын
I'm just starting Python and I'm already loving this language. This is so much more fun than PHP.
@DominicNweze
@DominicNweze 2 жыл бұрын
python is the best. 😊😊
@theonlycaulfield
@theonlycaulfield Жыл бұрын
That's kind-of a low bar. Anything is better than php.
@tiaantoinette8047
@tiaantoinette8047 3 жыл бұрын
The voice was instantly comforting - thank you for being my educator on flask in less than an hour!
@GoodStoryGames
@GoodStoryGames 2 жыл бұрын
Hello all. I figured out why this doesn't work. SQL alchemy has been updated since this video Tutorial. The problem is nobody explains it properly, but I will give you a quick fix. Instead of Running the db.create_all() command in the terminal Initialize the Database in your code after your Database Models classes have been setup: with app.app_context(): db.create_all() Basically, put this in your Flask app under the Db.Model classes. Make sure to indent properly and run your flask app one time. It should create the database (also check your instance folder for the db file). Then comment it out. You can run other SQL commands under the with statement if you need info on what's in your database file.
@mohitvashisht9259
@mohitvashisht9259 2 жыл бұрын
This is not working for me. Can you share your code please. Thanks!
@GoodStoryGames
@GoodStoryGames 2 жыл бұрын
@@mohitvashisht9259 What error message are you getting?
@mohitvashisht9259
@mohitvashisht9259 2 жыл бұрын
The database file is not creating while running the app.py file
@GoodStoryGames
@GoodStoryGames 2 жыл бұрын
@@mohitvashisht9259 Yes, but what error message are you getting in the terminal when you run the app.py file?
@mohitvashisht9259
@mohitvashisht9259 2 жыл бұрын
@@GoodStoryGames No error in itself, it is executing and giving no error but my database file is not created, as shown here.
@jacobmoore8734
@jacobmoore8734 4 жыл бұрын
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!
@anyanyanyanya27
@anyanyanyanya27 2 жыл бұрын
Same
@LamNguyen-nm1id
@LamNguyen-nm1id 2 жыл бұрын
Cory Schafer's flask series is something else, you should take your time taking it in. it's just that good
@carlfranz6805
@carlfranz6805 Жыл бұрын
Cory Schafer is pretty good. His downfall is that he talks way to fast and he skips steps. Also, I'm using a 32 inch screen and even then his VSCode display is still sometimes to small to read clearly. He also needs to do more illustrations, especially project structure. In any of these APIs, the project structure is very important to success AND understanding. It doesn't hemp that VSCode's method of displaying directory structure is less then optimal (read as 'stupidly bad'). Try running it at 0.75 speed. I find it helps with many of the tutorials available on KZbin. Also make sure KZbin is sending the highest available video quality. I'm regularly going into the settings and changing it back to 1080p (this really helps reading small print even on a large screen). I sometimes wonder whether having two screens would help doing these tutorials.
@juanfcgb
@juanfcgb 4 жыл бұрын
This tutorial is simply genius mate, you not only explain the very basics from a Flask app but the actual deployment to Heroku too. Probably one of best tutorials ever. Respect!
@GerardGRes
@GerardGRes 3 жыл бұрын
Wait, he is setting up an entire database like do this than that than that. I dont call that explaining, feels moren like a demonstration
@lycorislune3846
@lycorislune3846 2 жыл бұрын
@@GerardGRes right? I felt like he could've explained more
@sknganga3633
@sknganga3633 3 жыл бұрын
first freecode camp tutorial i have ever finished!
@isac.2h
@isac.2h 4 жыл бұрын
I need this: 15:53 30:45 42:40 Finished :) Good tutorial
@kristerl939
@kristerl939 5 жыл бұрын
Thanks, this was exactly what I needed to get going with flask :)
@mrcrazyenough007
@mrcrazyenough007 2 жыл бұрын
I have been working on different frameworks from different languages from the past 8 years. When it was PHP, I worked with CodeIgniter, Symfony, Laravel, Yii2 and CakePHP When it was NodeJs, I worked with ExpressJS, KoaJS, SailsJS and NestJS and now I got a new Python project and the requirement was Flask This crash course helped me a lot in kickstarting with Flask in no time, and definitely this crash course is mostly intended for experienced developers only.
@Sam_Lawther
@Sam_Lawther 4 жыл бұрын
This is a god send! Have a task using Flask and struggled for 2 weeks just to setup the virtual environment, thanks so much :) Liked and subbed!
@m.candace4967
@m.candace4967 Ай бұрын
00:07 Introduction to creating a basic CRUD application using Flask for Python 02:58 Checking and setting up Python environment 09:03 Creating static content with templates, CSS, and JavaScript 12:05 Creating templates and linking static content in Flask 18:30 Setting up the database and creating a new element 21:39 Creating form and inputs in Flask app 27:57 Using Flask to create tasks, redirecting, querying, and displaying in HTML template 30:48 Create part of our crud app is done 36:44 How to update tasks and handle the view function 39:56 Using if statements and Jinja to handle tasks and table display 45:12 Creating a proc file for Heroku deployment Crafted by Merlin AI.
@danield.7359
@danield.7359 4 жыл бұрын
Great tutorial about a great framework. The video nudged me into the right direction. I just finished a contract management app for our leasing business within less than a week. Thanks!
@ramankumar41
@ramankumar41 Жыл бұрын
The perfect hands-on intro to flask !!
@razvanc94
@razvanc94 4 жыл бұрын
Really nice tutorial. I'm a software developer who works in embedded systems/automotive and for my work I use C programming language for 99% of tasks and for the rest of tasks I use python. I enjoid this crash course.
@AnalystsCorner
@AnalystsCorner 3 ай бұрын
great tutorial! comprehensive and concise. I did have an issue with the DB creation step, so I ended up creating a separate file to execute the SQLite creation. The code is as follows. You can name the file anything you want, for anyone else having the same issue. ```import sqlite3 connection = sqlite3.connect("tasks.db") cursor = connection.cursor() create_table_query = """ CREATE TABLE IF NOT EXISTS tasks ( id INTEGER PRIMARY KEY, content TEXT NOT NULL, completed INTEGER DEFAULT 0, date_created TEXT DEFAULT CURRENT_TIMESTAMP );""" cursor.execute(create_table_query) connection.commit() ```
@BraziliansDid911
@BraziliansDid911 4 жыл бұрын
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. :-)
@ПавелКуликов-и3м
@ПавелКуликов-и3м 4 жыл бұрын
I guess it's not a Flask issue, but rather your browser is actually doing that caching stuff.
@MeetSinojia7
@MeetSinojia7 4 жыл бұрын
Thanks, I was confused by this behavior. Your comment saved me the time to debug it :)
@civ20
@civ20 4 жыл бұрын
Has nothing to do with Flask, it is your browser that is caching the website files.
@JoeDigital9
@JoeDigital9 4 жыл бұрын
THANK YOU! Great info
@georgigeorgiev271
@georgigeorgiev271 4 жыл бұрын
Thank you a lot!
@Blck4004
@Blck4004 23 күн бұрын
this is the best flask tutorial i've ever seen
@lhayanavieira7723
@lhayanavieira7723 3 жыл бұрын
for those who are having the database creating problem: just delete the "completed = db.Column(db.Integer, default = 0)" line so it's gonna work
@Mdhabibi-j786
@Mdhabibi-j786 Жыл бұрын
Still not working for me
@xanthe69
@xanthe69 3 жыл бұрын
the best and easiest flask tutorial I have ever seen
@kokowin5851
@kokowin5851 2 жыл бұрын
If you are not getting a lines to separate rows and columns like he did you can simply add this:
@pawnage3
@pawnage3 2 жыл бұрын
Any idea how he got the lines without adding this? Also, thanks for posting this!
@natashaiggwilv7193
@natashaiggwilv7193 2 жыл бұрын
@@pawnage3 different browser probably, others had the same issue only on Chrome and Firefox
@someoneokay5530
@someoneokay5530 4 жыл бұрын
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.
@lazyguy597
@lazyguy597 Жыл бұрын
NA..
@neeharika422
@neeharika422 4 ай бұрын
This video is like listening tests when you're learning a new language... and I'm here for it! Especially when if I'm really lost, google or ai can explain it simply so the flow of the vidio isnt lost by the slow explanations. Especially good because I have very basic knowledge of HTML and python!
@readthis1123
@readthis1123 2 жыл бұрын
For us windows nubs having trouble running the environment: To install : pip install --user virtualenv To create a virtual environment (env): python -m virtualenv env To activate: -env\Scripts\activate to deactivate: -deactivate
@alexkarav
@alexkarav 4 жыл бұрын
It's a really cool lesson. Every material, like books and video lessons, show how to create a blog, a nothing else. And this video is something special, thank You so much!
@АндрійКоваленко-и2й
@АндрійКоваленко-и2й 2 жыл бұрын
Wow, it was so easy explained. I believed that the topic is really difficult, but thanks to you, I understood everything. Thank you!
@alexandermarthius5593
@alexandermarthius5593 4 жыл бұрын
the fastest and easiest way for my first introdutions flask python.. you doing a great jobs jakerieger! Thanks you so much...
@BRBallin1
@BRBallin1 5 жыл бұрын
By far one of the best frameworks I used built in the most elegant programming language. Building REST APIs has never been easier.
@FilthySnob
@FilthySnob 4 жыл бұрын
How is it the best by far? If anything its just a little small framework
@david2beckham691
@david2beckham691 11 ай бұрын
Very simple and excellent tutorial for getting started with Flask
@da_winraja9740
@da_winraja9740 4 жыл бұрын
anyone having problem with the source command remember you just need to put in the location of activate.bat file, usually in the env directory.
@RobertoTucci
@RobertoTucci 4 жыл бұрын
thanks man, that has been my official introduction to Python and Flask! You rock!
@ivanyosifov2629
@ivanyosifov2629 4 жыл бұрын
It's an OK tutorial. But to me the tutorial felt rushed and took a lot of things for granted. The tutor sped across the bullet points with hardly any explanations.
@yashasr435
@yashasr435 4 жыл бұрын
this tut is for those who have prior knowledge of Python. i think he explained nicely i even fast forward at 1.50x
@Singularitarian
@Singularitarian 10 ай бұрын
There’s an audience for this though. Quick concise intros can be very useful.
@Portfelio
@Portfelio 8 ай бұрын
@yashasr435 Even knowing python it does really explain the basics. It's just implied you know why the application will 404 without @app. Like. Ok!? I could just have ChatGPT do this for me.
@aaryaparikh6447
@aaryaparikh6447 8 ай бұрын
Meanwhile i was watching on 1.5x 😂
@absero8
@absero8 3 ай бұрын
i actually liked it, the way he explained it didn’t work for me in some parts as i’m on windows so it allowed me to troubleshoot and solve it myself
@bipulkumar1556
@bipulkumar1556 3 жыл бұрын
This is amazing for a python experienced person, what is wanted to learn only how to quick started with flask.
@sushantdas1349
@sushantdas1349 3 жыл бұрын
Pretty good tutorial, although it can be a little too fast for a beginner with no backend experience. But for switching frameworks, this is really good. :)
@spicymercedes5287
@spicymercedes5287 2 жыл бұрын
agree
@deaththink
@deaththink 2 жыл бұрын
pause or use the .5 speed and or cc. thats what I do.
@catherinemamo6837
@catherinemamo6837 Жыл бұрын
I agree, but otherwise a very good one.
@AudreyGB
@AudreyGB 11 ай бұрын
As a beginner, it doesn't explain anything...
@someirrelevantthings6198
@someirrelevantthings6198 2 жыл бұрын
I got lost in large courses and having trouble. Found holy grail and got the grasp of flask.
5 жыл бұрын
Thanks a lot, it was truly enjoyable to follow your tutorial step by step to dive into Flask. Your voice is really nice to hear. Now, I feel like I have all the basics to build my own app. You did a great job.
@EdiFerreiranet
@EdiFerreiranet 5 жыл бұрын
Loved when you did open your Chrome and I saw that you are a PIRATE!!! :P
@albertulysses
@albertulysses 5 жыл бұрын
Thanks for the tutorial, I'm working through the Flask Mega-Tutorial right now as well and your video really helped me understand some of the things I didn't catch on his tutorial. For example, the difference between {{}} and {%%} for Jinja
@quanganhbui9503
@quanganhbui9503 5 жыл бұрын
I'm stupid so I'm still not sure, what's the difference , can you help me, please ?
@albertulysses
@albertulysses 5 жыл бұрын
@@quanganhbui9503 sure what isnt that you don't understand?
@quanganhbui9503
@quanganhbui9503 5 жыл бұрын
Albert Chavez the 2 brackets you mentioned above
@albertulysses
@albertulysses 5 жыл бұрын
@@quanganhbui9503 {%%} are statements for "for, ifs, and loops"and {{}} is to out put something. If you're familiar with python, when you write a for loop you have to write "for x in y: return x" here it's "{% for x in y%} {{ x }} {% endfor%} " of course this isn't a functional language, so it's not exactly used the same way but the concept is similar
@anupthatal5253
@anupthatal5253 5 жыл бұрын
Which flask mega tutorial you are using
@wahedshuvo
@wahedshuvo 4 жыл бұрын
Finally, I could really learn something on the web! You are an amazing educator!
@Omkarh
@Omkarh 5 жыл бұрын
I am stuck on 20:02 when I type "from app import db" in terminal it is showing this "TypeError: Additional arguments should be named _, got 'defult'"
@sylwesteroleszek3143
@sylwesteroleszek3143 4 жыл бұрын
You need to install flask-sqlalchemy. It looks like you have SQLAlchemy installed but not the Flask extension. Try pip install Flask-SQLAlchemy in your project's virtualenv to install it from PyPI.
@goddessleader
@goddessleader 4 жыл бұрын
@@sylwesteroleszek3143 Thank you!
@spaghetti534
@spaghetti534 4 жыл бұрын
@@sylwesteroleszek3143 thanks
@dotterel
@dotterel 3 жыл бұрын
legend, bruv
@ashish_yadav542
@ashish_yadav542 4 жыл бұрын
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: env\Scripts\activate
@issygaming5479
@issygaming5479 5 жыл бұрын
You guys almost reached 1 million subscribers 😎
@OttoFazzl
@OttoFazzl 5 жыл бұрын
1.1 already!
@jackcardozo
@jackcardozo 4 жыл бұрын
Glad I stumbled on your tutorial. I followed along for a couple of hours. Thanks so much!
@douglasfrb
@douglasfrb 4 жыл бұрын
Great tutorial, my friend! I have some experience with Django and yesterday I had to to build a simple crud application and Flask fitted well. Keep it up! 😁
@olayomateoreynaud9956
@olayomateoreynaud9956 4 жыл бұрын
at 6:21 If its not working for you. I used python -m pip install flask-sqlalchemy on Window`s cmd, and it worked
@tebogoawotunde4373
@tebogoawotunde4373 2 жыл бұрын
Great! Thanks, I so struggled with this that I ended up installing the flask-sqlalchemy package in the global env for the sake of progress. I am using Windows 11 and to install the package I used python3 to your suggestion and it worked like a charm! (i.e. python3 -m pip install flask-sqlalchemy) in the Command Prompt terminal
@lron1447
@lron1447 4 жыл бұрын
Thank you very much. It was indeed a great course. I was able to overview the connections between Python, Flask, CSS and SQL.
@kritigupta1525
@kritigupta1525 4 ай бұрын
If you are a complete beginner to flask, rather read through the basic syntax first and then watch this tutorial to get a sense of what's happening. otherwise its a good short, succinct overview of CRUD application in flask.
@mastercode7851
@mastercode7851 5 жыл бұрын
i just love your vscode setup the font and everything is unique
@anisbhsl
@anisbhsl 5 жыл бұрын
Went through the full video. Good intro for newcomers! Thank you!
@jasonlee6294
@jasonlee6294 5 жыл бұрын
Awesome, awesome. as an experienced developer, I could learn new stuff with your confident voice. Thank you, Dude
@arihantjain2432
@arihantjain2432 3 жыл бұрын
5:44 On Windows, make sure you are inside your project folder, then type --------> env\Scripts\activate
@halfstream1461
@halfstream1461 3 жыл бұрын
thank you so much
@circuitmasters5258
@circuitmasters5258 5 жыл бұрын
Brother This is what I needed..I got tons applications I am ready to deploy!
@AmatyazKing
@AmatyazKing 3 жыл бұрын
For anyone getting the problem, "python3 : The term 'python3' is not recognized as the name of a cmdle...." try removing spaces which will result as such; " app=Flask(__name__)". Spent an whole hour in this.
@destinyjames6117
@destinyjames6117 4 жыл бұрын
Tip: On windows dont put activate.bat, just do activate in command prompt. Note that the privacy issue or something does not allow this to be done in VSC in terminal.
@hardikjadwani7715
@hardikjadwani7715 2 жыл бұрын
Thanks a lot :)
@mynamejeff2880
@mynamejeff2880 2 жыл бұрын
for those who are having problem at 20:15 ,you have not installed the flask-sqlalchemy module !
@yashsolanki069
@yashsolanki069 5 жыл бұрын
Congratulations team #freecodecamp on reaching 1 Million milestone !🙌
@kirtan__prajapati1827
@kirtan__prajapati1827 4 жыл бұрын
This type of course can encourage people for making Time Valuable
@shervinrad100
@shervinrad100 4 жыл бұрын
I get an error at 20:00 because ImportError: DLL load failed: The specified module could not be found. line 27, in from _sqlite3 import *?
@cosmicvoice7657
@cosmicvoice7657 3 жыл бұрын
good
@breathemath4757
@breathemath4757 3 жыл бұрын
Just as a side note for anyone watching this. You’re not restricted to using the url_for( ) function when specifying paths. You can hardcore the path just like you’d do without Flask. The url_for() function is helpful if we wish to pass parameters to the page nonetheless.
@yvankoabiloa9490
@yvankoabiloa9490 2 жыл бұрын
Can you help me out with this? url_for is not defined in Flask when I try it. I don't have a clue how to solve this problem? You'll be a savior to help me
@breathemath4757
@breathemath4757 2 жыл бұрын
@@yvankoabiloa9490 maybe try: from flask import url_for
@yvankoabiloa9490
@yvankoabiloa9490 2 жыл бұрын
@@breathemath4757 I tried but it didn't work
@Kenobiii
@Kenobiii 5 жыл бұрын
Great tutorial! A lot of densly packed information for a person who is not that familiar with web applications, but I already learned a lot in this tutorial!
@namegoeshere657
@namegoeshere657 3 жыл бұрын
Amazing tutorial! BEST beginner flask tutorial out there!!
@mdhidayat1117
@mdhidayat1117 3 жыл бұрын
if you have Windows and getting errors while activating a new virtual env, try this ".\env\Scripts\activate " and ".\env\Scripts\activate.bat " instead of "source env/bin/activate".. one of them will work. first one worked for me, latter didn't.
@_s._.unshine
@_s._.unshine Жыл бұрын
YOU ARE MY HERO
@obiwanfisher537
@obiwanfisher537 Жыл бұрын
Okay Obiwan, you found it in the archives. Maybe they are complete after all. And it didn't cost me a credit. Now I just to meditate over these new techniques until I master their powers so the evil forces (wageslavery) won't take a hold of me. I will protect the lifestyle at any cost! May the python be with me!
@natashaferguson1618
@natashaferguson1618 2 жыл бұрын
If you are on Windows, activate your virtual environment with env/Scripts/activate
@cindinishimoto9528
@cindinishimoto9528 4 жыл бұрын
I'm so happy I just got my first web app using flask!! Thanks, man!
@dorb1337
@dorb1337 3 жыл бұрын
I did everything as you showed till 19:50 - when you go into the venv, opens python3 and run the command 'from app import db' - I receive the error "traceback... from flask import Flask, render_template ModuleNotFoundError: No module named 'flask' " - I searched all of google and sof - and couldn't solve it, any tips?
@dorb1337
@dorb1337 3 жыл бұрын
Succeeded to work this out. I just had more than 1 python versions on my laptop and needed to use "pip3" instead of "pip", or "python" instead of "python3" .. it was all messed up. Anyways - Just deleted all of the python and pips I had in "environment variables" (PATH) on the computer and reinstalled and it worked like magic and created a db file for me :) thank you for the great video.
@criscrix3
@criscrix3 2 жыл бұрын
@@dorb1337 You're a life saver. When in doubt always ctrl+f in the comments for the error
@KenJee_ds
@KenJee_ds 5 жыл бұрын
Awesome video! If you watch it in 2x speed you can learn it in 30 minutes!
@StefanosStavropoulos
@StefanosStavropoulos 4 жыл бұрын
Nice tutorial, thank you! I'm getting the error "Instance of 'SQLAlchemy' has no 'Column' member " when I try to add id variable under class Todo(db.Model). SQLAlchemy is imported though. Any ideas?
@darioradic117
@darioradic117 4 жыл бұрын
The following info from StackOverflow resolved the same problem for me: pip install pylint-flask on your project directory find folder .vscode (if you dont have it, just create it) inside settings.json add this line { "python.linting.pylintArgs": [ "--load-plugins", "pylint-flask" ] }
@carlosamaral6917
@carlosamaral6917 4 жыл бұрын
@K Mmm I have the same problem as well. In both Vscode and pycharm
@Koriruttii
@Koriruttii 3 жыл бұрын
@@darioradic117 I added that but still getting the error
@athegreat88
@athegreat88 3 жыл бұрын
CTRL+SHIFT+P select linter disable linter. Restart VS code that solved my problem.
@sumitapathak2900
@sumitapathak2900 4 ай бұрын
Thank you. I finally have a development project in Python now. And ofcourse I am gonna keep learning
@landwand
@landwand 3 жыл бұрын
I'm doing my *best* to follow each step, but by 22:15, I know that I'm missing something. 1) table is not centred onto middle of page (remember how Margin was set to 0 before?) 2. table has no border What am I missing? Did the instructor go back to the CSS file without me knowing, or did I set something incorrectly?
@ofgalacticstuff
@ofgalacticstuff 3 жыл бұрын
I have the same problem, did you fix it?
@landwand
@landwand 3 жыл бұрын
@@ofgalacticstuff I actually went into the CSS file and played around with the table settings so that it'd look good. My guess is that the instructor went ahead and did this without mentioning it.
@for96
@for96 2 жыл бұрын
@@landwand You are right, check the code in the description (git repository), go to main.css file. There are these changes.
@izzlenizzle
@izzlenizzle 3 жыл бұрын
Simple and eloquent crud app tutorial. Nicely done!
@erickballesteros4531
@erickballesteros4531 4 жыл бұрын
lowkey bugging how your css file is minimal, yet the moment you introduced html tables, they were already styled... how?
@greensponge6538
@greensponge6538 4 жыл бұрын
Erick Ballesteros You can copy off the css styling code from the github page linked in the description
@erickballesteros4531
@erickballesteros4531 4 жыл бұрын
@@greensponge6538 I ended up doing that lol
@lawinrollevi2776
@lawinrollevi2776 4 жыл бұрын
Just learn Css lol
@gourabjitbiswas
@gourabjitbiswas Жыл бұрын
Having problems 5:43 The windows command isn't working. Any fixes? Mine isn't bash terminal probably, it's written just Code in the part of terminal name.
@spezistyle
@spezistyle 3 жыл бұрын
I'm on Windows and having problem creating that procfile ('Push failed: cannot parse Procfile.'). Any help how to create that empty file?
@LS-cb7lg
@LS-cb7lg 4 жыл бұрын
amazing workflow i dont know how you can be so fast! amazing tutorial too thanks a lot!
@bulcub
@bulcub 5 жыл бұрын
This really filled in some missing blanks, especially on how to setup in Visual Studio Code. Thanks
@lukeverso
@lukeverso 2 жыл бұрын
Such a cool tutorial, finally one short and complete!
@MichaelShingo
@MichaelShingo Жыл бұрын
If anyone runs into an error at 30:34 says the table "todo" does not exist I had to add the with.app.app_context(): db.create_all in my code instead of only running it once in the command line. Like so: db = SQLAlchemy() #initialize database app = Flask(__name__) #references this file app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///test.db' #three /'s is relative path, 4 is absolute path db.init_app(app) class Todo(db.Model): #Todo is the table name, it's automatically lowercase when it's created id = db.Column(db.Integer, primary_key=True) content = db.Column(db.String(200), nullable=False) date_created = db.Column(db.DateTime, default=datetime.utcnow) def __repr__(self): return '' % self.id #when you create new element, it returns the task and the id of the task created with app.app_context(): db.create_all()
@randidoesthings
@randidoesthings Жыл бұрын
thank you:]
@sweetphilly2
@sweetphilly2 4 жыл бұрын
Heads up: if you plan on using conda to perform this tutorial, make sure you're using pip to install these packages; otherwise, you may run into an issue with the packages in requirements.txt pointing to the conda installation of the package. You'll experience a "No such file or directory" error during the push to master.
@franciscobacotich2672
@franciscobacotich2672 Жыл бұрын
og
@hangchen
@hangchen 2 жыл бұрын
If you have every packages installed, start at 6:23
@sarathkumar-ie5iu
@sarathkumar-ie5iu 5 жыл бұрын
what does this mean '' % self.id? Why is it enclosed in a tag and what does the percentage mean?
@ARKSYN
@ARKSYN 5 жыл бұрын
All that line does is return a printable representation of the Todo class we created. The percent is Python syntax for string interpolation where '%r' is the placeholder and the '% self.id' is what will replace the '%r'. In this case we're just printing: where id is the id of the Todo object we just created. The brackets are just for formatting they aren't necessary.
@sarathkumar-ie5iu
@sarathkumar-ie5iu 5 жыл бұрын
@@ARKSYN Thank you the brackets confused me
@kelvinomereshone3541
@kelvinomereshone3541 5 жыл бұрын
Percentages are Jinja2 syntax
@Lucaischz
@Lucaischz 4 жыл бұрын
I actually think it would be better to use __str__() other than __repr__() as it's not going to be the exact representation of the class, which should be Todo().
@mayursawarkar7916
@mayursawarkar7916 4 жыл бұрын
Good example and simple steps that one can follow along. I'm able to create that Task Master. Kudos to you! Thanks!
@timotheospetros
@timotheospetros 5 жыл бұрын
How do Windows users install Flask and SqlAlchemy to their newly activated environment?? When I follow the instructions here, these packages get installed to my global Python37 folder instead. I wish Python were a little more Windows-friendly :(
@MilkJug12
@MilkJug12 3 жыл бұрын
Tip, if you encounter a issue with return_template is undefined, make sure at the top where the from flask import Flask, do from flask import Flask, return_template.
@ofgalacticstuff
@ofgalacticstuff 3 жыл бұрын
In 22:09 you got the table in the Center of the Page with Borderlines for columns. I don't get that, my table is to the Left and without Borders.
@whinit6487
@whinit6487 3 жыл бұрын
just got same problem >w>
@ofgalacticstuff
@ofgalacticstuff 3 жыл бұрын
@@whinit6487 do update if you fix it 🙏
@bri1232001
@bri1232001 3 жыл бұрын
@@ofgalacticstuff I havent figure this out but I find if I load my page in IE or MS Edge it looks right but not in chrome or firefox.
@technicolourmyles
@technicolourmyles 3 жыл бұрын
It's because he completely skipped over the part where he wrote the CSS for the table. Check out the GitHub link in the description, copy the css code from the css.main file posted there and your table should show up like in the video.
@ofgalacticstuff
@ofgalacticstuff 3 жыл бұрын
@@technicolourmyles thank you for the response, yes, that's what i did in the end ;)
@dwmkryft
@dwmkryft 3 жыл бұрын
amazing. he didn't explain what every little element means and what it's used for, the result? hands on lesson with homework you have to do useful. all of this with the added high of having completed (and created) something with your own hands. I wish more teachers were like this!
@podoliev
@podoliev 5 жыл бұрын
Thanks a lot, this is an amazing tutorial! I highly recommend it to everybody;)
@jubairsami8524
@jubairsami8524 4 ай бұрын
it's stunning that no chatgpt were existing when this tutorial was made
@KetanLambat
@KetanLambat 5 жыл бұрын
If the css content is not loading, try refreshing the browser cache
@stefanbaumann7474
@stefanbaumann7474 4 жыл бұрын
THANKS
@hardikmistry1661
@hardikmistry1661 3 жыл бұрын
great tutorial for flask i am just try to understand after nodejs for rest api and i all understand of this great intro for basics great work sir
@sanjaymadhavan1893
@sanjaymadhavan1893 4 жыл бұрын
if someone gets an error with the source command on the Visual Studio terminal (PowerShell), open powershell in admin mode from the start menu. run the command : Set-ExecutionPolicy Unrestricted then hit y. after this enter the following command on VSCode: .\env\Scripts\activate.ps1
@afahayangha6085
@afahayangha6085 5 ай бұрын
Great content. Very explicit. You nailed it in such a short time Thanks!
REST API Crash Course - Introduction + Full Python API Tutorial
51:57
build a meme Python website (Flask Tutorial for Beginners)
13:30
NetworkChuck
Рет қаралды 517 М.
If people acted like cats 🙀😹 LeoNata family #shorts
00:22
LeoNata Family
Рет қаралды 43 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 54 МЛН
Full Flask Course For Python - From Basics To Deployment
3:42:31
NeuralNine
Рет қаралды 55 М.
Coding Was HARD Until I Learned These 5 Things...
8:34
Elsa Scola
Рет қаралды 771 М.
Flask vs Django in 2024 - Make a RIGHT Choice (Difference Explained)
9:32
Daniel | Tech & Data
Рет қаралды 54 М.
Python Django Web Framework - Full Course for Beginners
3:45:41
freeCodeCamp.org
Рет қаралды 4,7 МЛН
FastAPI, Flask or Django - Which Should You Use?
9:49
Tech With Tim
Рет қаралды 109 М.
Simple Web App with Flask and Heroku - Python GUI for Beginners
25:07
Python Simplified
Рет қаралды 229 М.
Python Flask Tutorial: Full-Featured Web App Part 2 - Templates
31:42
Corey Schafer
Рет қаралды 895 М.
Python NumPy Tutorial for Beginners
58:10
freeCodeCamp.org
Рет қаралды 1,6 МЛН
If people acted like cats 🙀😹 LeoNata family #shorts
00:22
LeoNata Family
Рет қаралды 43 МЛН