Unbelievably helpful. Watched a few of these videos and I feel like I learned a ridiculous amount in just one day. Went from 0 knowledge of HTML and flask with basic python to feeling like I can make any website lol
omg this is such a great tutorial!! i wasted 2 days trying to make my post/get methods work and was about to give up haha but fortunately i found this video! thank you for such a clear explanation!!!
Exactly what I needed for an example of how to use an HTML form with flask. I really appreciate how you provide a simple example and keep it to around 10 minutes. Thanks man, I'm trying to do my college homework for Python class and this was great.
I just watched this video 3 times to figure out that my post method wasnt working because I put "methods" in the html form attribute instead of "method".....i love coding so much
I really wanna move onto the next video but I had to stop and comment and say how great these videos are. This is EXACTLY what I've been looking for! Thank you SO much! I'll be watching the videos in order, but hopefully you have a video the covers how to upload file to the server I can run functions on. If not maybe, you can make a video. It's something I've been stuck on for a while now. Thanks!!!
Your videos are very user-friendly and easy to follow along with! You have helped me more than I could say! Thanks for all your hard work and dedication!
This video is great. I am a SQL developer, so python and HTML are a side gig for me. I was struggling with taking in input from a flask server and passing it to other functions but you have explained everything in a way that is both easy to understand and is translatable to my application's needs. Thanks so much!!!!
I did this because yes. I put some pride into my work and merged the RENDER_TEMPLATE function with a dictionary called CONTENTS that is basically configuration. Here is script Number 1 from flask import Flask, redirect, url_for, render_template from settings import contents def rendertemplate(name): return render_template(name, contents=contents) Here is script Number 2 contents = { "forListTest":["This", "is", "a", "test."], "title":"Trebla2" } Please note that this is super early on, so some of this is probably gonna change when i finish.
I dont get it why do you have also and base.html and index.html, can you show them and what is difference between this 2, great video, but I am confused with 3 html files insed of 2
I think that it is a kind of bad practice using "/" URL. What if your username will be equal to "login"? The better way is to use URL like "/user/" which will never collide with "/login" or any other pages we would have in the website root.
salamat dok sa inyo salamat sa pagtulong niyo pag-aalaga ay tapat at totoo maayos na kalusugan buong hangad kanino man sa bawat pilipino'y kayo ang takbuhan kaya't salamat dok sa pagtulong na lubos kalusugan namin naging maayos salamat dok sa inyo nakagabay lagi kayo impormasyong hatid laan sa bawat tao salamat dok sa inyo salamat sa pagtulong niyo pag-aalaga ay tapat at totoo maayos na kalusugan buong hangad kanino man sa bawat pilipino'y kayo ang takbuhan salamat dok (5x)
Dear bro Tnx for your video . I need to know how i can appear the captcha code in busy or overloaded sites when tis not shown captcha code ( just show the image box instead off captcha code) by get and post method.
guys! its important. When you copy Navbar, CSS and JS you have to use version Bootstrap v4.3. Now at 2020 October its v 4.5 new version makes lots of problem when you try Login with method POST
found a way to resolve this.. You have to parse the multiple parameters with the url (using javascript redirect option).. then when it has been redirected to your app route, then var 1 = request.args.get('your_param_name1') rvar 2 = equest.args.get('your_param_name2')
Great video. My doubt is that I need to send a value selected from a drop down as a GET parameter to my Flask backend. How do I do that? Here you used the function request.form[id] but I need to pass a variable (or parameter) which I would select from a dropdown list.
I heard that isn't necessary (HTML works with and without "/"). However, if u want to have page compatibile with XHTML, u need all closing (/) tags, even in sth like input, br and img
Interestingly, I have left the re-route function from the previous video in the code and the POST, GET function re-route uses that one instead of the one I have created for it. Wonder why?
If we need to transmit large data through a redirect, how can we do that? I encountered an 'ERR_RESPONSE_HEADERS_TOO_BIG' error when attempting to pass the data.
@@MuffinologyTrainer dude shut up and be grateful. You wanna pay $400 for a shitty udemy course? Go ahead. Nobody wants you to just complain and discredit the guy for his work.
If you watch closely, you'll notice that Tim was explaining things correctly. His mistake was due to an honest error. When re-posting, he merely went too fast and didn't change the URL. Be nice. I commend him and anyone who gives of themselves. No need for the rudeness and crass comments/language.
It seems the browser re-did the last action which was a POST. If Tim did tape enter in the url bar, he would have get a GET method. Don't know if I'm clear, english is not my native linguage... :/
Hang, browsers repeat the last request they sent when they are asked to refresh a page. When the last request sent is a POST, when you refresh you get a POST again. A refresh would cause a duplicate form submission, which in almost all cases is not the desired action. For that reason, the browser asks for confirmation from the user (browser-pop-up message shown in the video). Many users do not understand this warning from the browser. Consequently, it is considered good practice for web applications to never leave a POST request as the last request sent by the browser. This is achieved by responding to POST requests with a redirect instead of a normal response. All these info comes from Miguel Grinberg's Flask Manual. I think your question was pretty clever and you didn't mean to "complain" or "discredit" Tim, whom by the way rocks at teaching. Have a good day!
Hello Tim, Can we redirect to a site with post request? Suppose, "website/shortit" need "url" arg as post request. Now in "website" if i click on submit button. It will process the request and and if any conditions come true. It will redirect to "website/shortit" with post request. Every conditions have different arg. . . Can we redirect with post request??
Good video! I thinking how to get that data from input and just print it in console (other purpose, than generating page - for example just adding something to db), I tried but without success. Maybe is super-easy and I am just to tired ..
Tim, could you please make a Udemy course. I love your fantastic teaching style. Udemy makes it easier for us "third world" student to afford quality content. Much appreciation from South Africa! ™️💯
Could Flask be used instead of PHP on a WAMP server to host my own website on my laptop just for experimentation but also have the server connected online so people can visit it? I understand the security risks.
If you are getting the error 405 Method not allowed use the line methods = ["GET","POST"] on the @app.route wrapper seperated by a comma next to the subpage like so app.route("/login",methods=["GET","POST"]) fixed the problem for me
Ok, wow, after a lot of struggle I was able to make this work. Phew! But I was actually trying something way more advanced, to obtain the inputs from drop down lists and print them on the screen. Tim, is it possible to print the value in the same main page? Right now in order to display the values I am needing to go to a new Url, which doesn't make sense. I want to display the values in the same page as the drop down menus (there are various of them).
Hey Tim can you make a tutorial for how to conect html,css,js with FLAK, and we should also be able to send and receive data in the json format, and I hope you use axios, or else you can use jquery and ajax.
7:09, after I login it comes with this error:werkzeug.routing.BuildError: Could not build url for endpoint 'harshi' with values ['usr']. Did you mean 'static' instead? plz help thanks
try doing the tutorial again, it's great as its only a 10-minute video, I don't know if over the past week you've resolved that problem but I'm 9 minutes in and I have no problems
@@tradingwithsujay for the redirect I put redirect to the user page but I put just put user, you have to put user in quotation marks because that's the page
i do have a question sir ...the way these forms are been rendered are they safe from csrf hacks ...because you didn't use flask wtf and i heard it prevents such attacks..i hope you understand me
Unbelievably helpful. Watched a few of these videos and I feel like I learned a ridiculous amount in just one day. Went from 0 knowledge of HTML and flask with basic python to feeling like I can make any website lol
Same. am all like isn't this too much.
omg this is such a great tutorial!! i wasted 2 days trying to make my post/get methods work and was about to give up haha but fortunately i found this video! thank you for such a clear explanation!!!
I have also wasted 2 days. Hope this tutorial will give with i want.
For people in future check out
Flask CS50
The explanation is phenomenal
why are you subscribed to andyjaide?
Exactly what I needed for an example of how to use an HTML form with flask. I really appreciate how you provide a simple example and keep it to around 10 minutes. Thanks man, I'm trying to do my college homework for Python class and this was great.
I just watched this video 3 times to figure out that my post method wasnt working because I put "methods" in the html form attribute instead of "method".....i love coding so much
lol
Dude same 😭
🤣🤣
same :DD
Same mistake😢. Thanks
The clearest video on this topic I have seen so far. Thank you so much Tim. Really helpful and understandable for us absolute beginners.
thanks! I was stuck all afternoon trying to connect a form and I solved it right away with your video.
Love how you give context to the content and what you're doing, great tutorial!
This guy is a sick lad. Does't worry about or-complicated explanations and just gets straight to the point
I really wanna move onto the next video but I had to stop and comment and say how great these videos are. This is EXACTLY what I've been looking for! Thank you SO much!
I'll be watching the videos in order, but hopefully you have a video the covers how to upload file to the server I can run functions on. If not maybe, you can make a video. It's something I've been stuck on for a while now. Thanks!!!
You saved me after 9 hours of coding your the best thank you thank you thank you
You don't know it but you're becoming my hero !
I am very glad that you have created these videos on this topic. this just saved me from failing a class.
Your videos are very user-friendly and easy to follow along with! You have helped me more than I could say! Thanks for all your hard work and dedication!
This video is great. I am a SQL developer, so python and HTML are a side gig for me. I was struggling with taking in input from a flask server and passing it to other functions but you have explained everything in a way that is both easy to understand and is translatable to my application's needs. Thanks so much!!!!
much appreciate Tim! hope to see deep and advanced tutorials about Flask..
I did this because yes.
I put some pride into my work and merged the RENDER_TEMPLATE function with a dictionary called CONTENTS that is basically configuration.
Here is script Number 1
from flask import Flask, redirect, url_for, render_template
from settings import contents
def rendertemplate(name):
return render_template(name, contents=contents)
Here is script Number 2
contents = {
"forListTest":["This", "is", "a", "test."],
"title":"Trebla2"
}
Please note that this is super early on, so some of this is probably gonna change when i finish.
Very helpful video for figuring out how to use Get and Post requests with Flask. Thank you very much.
Brief and brilliant explanation.
Great material and finally I learnt to develop a web application!
Hey, Tim. Would you mind showing us what packages have you installed on your Sublime Text?
dude thanks so much, i wanted to know how to make buttons for my webpage and now it works thanks man
Thank you so much, You saved my life. I hope your channel grow more & more
Thanks bro u r da best Tim. I really appreciate this because i have advanced alot
This is really helpful. Thanks Tim, very clearly explained.
There goes my hero. Watch him as he goes!
Best Instructor Ever !!
I dont get it why do you have also and base.html and index.html, can you show them and what is difference between this 2, great video, but I am confused with 3 html files insed of 2
This saves tons of time, thank you.
The key difference between GET and POST - GET doesn't have request body. That's why POST is secure - you can send encrypted data .
this is exactly what I needed.
Please Tim IOT toturials plz .I trully really like and follow your Tutorials
unbelievebly understandable, congrats!
Thanks buddy. The videos were really helpful. To the point and informative as hell.
this is so good. great work! bless your day
Thank you so much, very helpful.
Very clear, thank you.
I think that it is a kind of bad practice using "/" URL. What if your username will be equal to "login"?
The better way is to use URL like "/user/" which will never collide with "/login" or any other pages we would have in the website root.
Thank you, Really appreciate your work..!
Hey Tim your video has been a great help to me but can you tell me how can I show the output on same page below my form when I click the button.
Thanks a lot Tim
Simple and Clear. Thanks a Lot
Thank you for this awesome tutorial!
Appreciate your work keep it up!
God bless you bro ❤
Thank you very much for this video! It was very educational for me :)
this is an excellent series, thank you Tim
Waiting for next video impatiently ...
so clear. thx , Tim.
salamat dok sa inyo
salamat sa pagtulong niyo
pag-aalaga ay tapat at totoo
maayos na kalusugan
buong hangad kanino man
sa bawat pilipino'y kayo ang takbuhan
kaya't salamat dok
sa pagtulong na lubos
kalusugan namin naging maayos
salamat dok sa inyo
nakagabay lagi kayo
impormasyong hatid laan sa bawat tao
salamat dok sa inyo
salamat sa pagtulong niyo
pag-aalaga ay tapat at totoo
maayos na kalusugan
buong hangad kanino man
sa bawat pilipino'y kayo ang takbuhan
salamat dok (5x)
absolute legend ty so much!!!
Dear bro
Tnx for your video .
I need to know how i can appear the captcha code in busy or overloaded sites when tis not shown captcha code ( just show the image box instead off captcha code) by get and post method.
Thanks for your lessons!
Amazing tutorial
guys! its important. When you copy Navbar, CSS and JS you have to use version Bootstrap v4.3. Now at 2020 October its v 4.5
new version makes lots of problem when you try Login with method POST
best video tutorial
Thank you so much for the videos learning a lot...:)
lol @6:13
If youre having trouble with errors check task manager and see if there arw any python files running in background
Thanks for the great video Tim. Can you please explain how we can get more than one value in the login route if the form has more input tags?
have you found the solution to pass 2 values?
found a way to resolve this..
You have to parse the multiple parameters with the url (using javascript redirect option).. then when it has been redirected to your app route, then
var 1 = request.args.get('your_param_name1')
rvar 2 = equest.args.get('your_param_name2')
Fantastic lesson, you helped me a lot. Thank you so much!
what a legend, very helpful
How would you go about adding posts/blogs?
Great video. My doubt is that I need to send a value selected from a drop down as a GET parameter to my Flask backend. How do I do that? Here you used the function request.form[id] but I need to pass a variable (or parameter) which I would select from a dropdown list.
This gives me error as "The method is not allowed for the requested URL." even if i wrote exactly the same code.
If we on vsc will we choose pyton Or html for working?
won't giving # in action cause problems later? What should we put in its place?
Thank you brother for this tutorial.
What is the purpose of "/" before the closing tags?
input is a self closeing tag
I heard that isn't necessary (HTML works with and without "/"). However, if u want to have page compatibile with XHTML, u need all closing (/) tags, even in sth like input, br and img
@@_b0mbix_ thanks
Cool, thx for this. I was working on a Flask app recently and this, I hope, will validate I did something good :) Waiting for more episodes.
Interestingly, I have left the re-route function from the previous video in the code and the POST, GET function re-route uses that one instead of the one I have created for it. Wonder why?
Thanks Tim!
If we need to transmit large data through a redirect, how can we do that? I encountered an 'ERR_RESPONSE_HEADERS_TOO_BIG' error when attempting to pass the data.
HI, Instead of printing all the columns in GET request, How could I get only specific columns from the postgres table?
7:27 It seems you still get POST when you refresh it?
@@MuffinologyTrainer dude shut up and be grateful. You wanna pay $400 for a shitty udemy course? Go ahead. Nobody wants you to just complain and discredit the guy for his work.
If you watch closely, you'll notice that Tim was explaining things correctly. His mistake was due to an honest error. When re-posting, he merely went too fast and didn't change the URL. Be nice. I commend him and anyone who gives of themselves. No need for the rudeness and crass comments/language.
It seems the browser re-did the last action which was a POST. If Tim did tape enter in the url bar, he would have get a GET method.
Don't know if I'm clear, english is not my native linguage... :/
Hang, browsers repeat the last request they sent when they are asked to refresh a page. When the last request sent is a POST, when you refresh you get a POST again. A refresh would cause a duplicate form submission, which in almost all cases is not the desired action. For that reason, the browser asks for confirmation from the user (browser-pop-up message shown in the video).
Many users do not understand this warning from the browser. Consequently, it is considered good practice for web applications to never leave a POST request as the last request sent by the browser. This is achieved by responding to POST requests with a redirect instead of a normal response.
All these info comes from Miguel Grinberg's Flask Manual.
I think your question was pretty clever and you didn't mean to "complain" or "discredit" Tim, whom by the way rocks at teaching. Have a good day!
Can I have the server st a different domain than the front end ? How would i communicate? Via js request
Thanks for sharing
Hello Tim, Can we redirect to a site with post request? Suppose, "website/shortit" need "url" arg as post request. Now in "website" if i click on submit button. It will process the request and and if any conditions come true. It will redirect to "website/shortit" with post request. Every conditions have different arg.
.
.
Can we redirect with post request??
Great stuff, as usual! Thanks for sharing this! Any plans on discussing security, like input sanitization etc?
ty *Tim sorry for saying your name wrong last time.
I really appreciate these series.
Hi! Awesome!
What would you recommend for hosting of the simple site writing in python?
Good video! I thinking how to get that data from input and just print it in console (other purpose, than generating page - for example just adding something to db), I tried but without success. Maybe is super-easy and I am just to tired ..
heeey, i have a problem, i can't get the POST request on the terminal and if i type nm and click submit it doesnt do anything
usefull and complete thank you
Is this tutorial or a skill show?
Tim, could you please make a Udemy course. I love your fantastic teaching style. Udemy makes it easier for us "third world" student to afford quality content.
Much appreciation from South Africa! ™️💯
I have a course on teachable!
@@TechWithTimsend the link broski
the the case of post it isn't working .what do you think canbe the error
Could Flask be used instead of PHP on a WAMP server to host my own website on my laptop just for experimentation but also have the server connected online so people can visit it? I understand the security risks.
If you are getting the error 405 Method not allowed use the line methods = ["GET","POST"] on the @app.route wrapper seperated by a comma next to the subpage
like so app.route("/login",methods=["GET","POST"])
fixed the problem for me
But if we show the input value in the url then it is not safe ig, coz its a post request
Ok, wow, after a lot of struggle I was able to make this work. Phew! But I was actually trying something way more advanced, to obtain the inputs from drop down lists and print them on the screen. Tim, is it possible to print the value in the same main page? Right now in order to display the values I am needing to go to a new Url, which doesn't make sense. I want to display the values in the same page as the drop down menus (there are various of them).
Hey Tim can you make a tutorial for how to conect html,css,js with FLAK, and we should also be able to send and receive data in the json format, and I hope you use axios, or else you can use jquery and ajax.
pls how can i retrieve more than one form data without using json .
like lets say i want to retrieve item and quantity
Thanks for the video Tim. Can you recommend a book about web development?
why can't I use a get request when receiving data from the form?
Awesome !!!
I put / in the def home route and it gives me an error. Why is that?
Thanks It worked
7:09, after I login it comes with this error:werkzeug.routing.BuildError: Could not build url for endpoint 'harshi' with values ['usr']. Did you mean 'static' instead?
plz help thanks
try doing the tutorial again, it's great as its only a 10-minute video, I don't know if over the past week you've resolved that problem but I'm 9 minutes in and I have no problems
@@safwanakhtar2528 Yes thank you I resolved it, it was a silly mistake
@@minecraft4life688 bro what was the mistake I am getting same problem
@@tradingwithsujay for the redirect I put redirect to the user page but I put just put user, you have to put user in quotation marks because that's the page
Atleast that was the mistake for me
I would like to ask to you if there is a chance that you will show up how to cooperate with sqlite and flask together. Thanks for watching this.
07:34 Determine POST and GET in login function
i do have a question sir ...the way these forms are been rendered are they safe from csrf hacks ...because you didn't use flask wtf and i heard it prevents such attacks..i hope you understand me