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.
💻Code:
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/
Can someone please help in deploying my flask app to aws elastic bean ..please its urgent
this is very nice tutorial for starting to flask. please can you create more detailed video?
Thank you very much for this flask tutorial.
and it all made sense!!!
For anyone that can't load the webpage just try "Python" Instead of "Python3"
I'm getting a "sqlalchemy.exc.OperationalError no such column error" for date_created
If for some reason the CSS isn't working, reaload with Ctrl + Shift + R
Excellent, no waste!!!
Why when I import SQLAlcehmy from flask_sqlalchemy it says module not found when in my env I have it installed?
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!
Thanks. This helped to get me started!
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. 🙂
awesome tuorial
you seem in such a hurry
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 …
Thanks buddy..
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
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
what font use to visual studio code?
amazing workflow i dont know how you can be so fast! amazing tutorial too thanks a lot!
im in minute 22:15 and my app does not have any box and still is stuck to the left. what to do?
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:".
warnings.warn(
can anyone help me? thankyou
Finally, I could really learn something on the web! You are an amazing educator!
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
from app import db is showing error that cannot import db from app
doing this on windows
can anybody help with this?
Amazing tutorial! Thanks a lot 🙂
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.
You should not put content in the <head> area
When I type db.column i get an error
Unresolved attribute reference 'Column' for class'SQLALchemy'
Thanks
source 'env/Scripts/activate.bat' this does not work
this is does not work in windows
i need this with mongodb any help guys?
My page is not displaying the table. Is it a table margin, border problem?
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.
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.
Code: from app import db | Error: can't read /var/mail/app
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!
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.
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?
Why not just use
From flask import * ?
It says jinja2.exceptions.TemplateNotFound and I basically copi2ed him
you all are great and unique
Good stuff
Great presentation. Learned a lot.
I'm getting error at virtualenv env says command not found. Pls help
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