There are tons of Python web frameworks and Flask is one of them but it is not a full stack web framework.
It is βa microframework for Python based...
For further actions, you may consider blocking this person and/or reporting abuse
Hi Sahil,
I just wanted to add an error I ran into while attempting this tutorial.
I received an error 'NameError: name 'name' is not defined'
after checking stackoverflow, I found a solution and changed (name) to (
__name
__) and this worked for me.I hope this helps someone else with here,
Thanks!
Hi Dmitri,
I have written __ name __ but somehow it changed to 'name'.
Thank you for pointing out the mistake.
I'm getting an Error here -
(venv) Sandips-MacBook-Pro:Sandip_TSConsole_Coral_Prototype_GIT sanbaner$ export FLASK_APP=hello.py
(venv) Sandips-MacBook-Pro:Sandip_TSConsole_Coral_Prototype_GIT sanbaner$
(venv) Sandips-MacBook-Pro:Sandip_TSConsole_Coral_Prototype_GIT sanbaner$ flask run
Error: Could not import "hello".
(venv) Sandips-MacBook-Pro:Sandip_TSConsole_Coral_Prototype_GIT sanbaner$
Working fine now !
hi how did u solve this? i get the same error as well.
to see it in the network
Thank you for this. You may wish to add the command for Windows CMD and Windows Powershell in the last section (as you have in the previous sections). I was using Powershell so had to look it up when I realised what you had put was for Unix.
Windows CMD:
Windows PowerShell:
Hello,
When trying to do this: *venv\Scripts\activate * I get the error:
venv\Scripts\activate : File C:\Users\My\Desktop\CS50\project\venv\Scripts\Activate.ps1 cannot be loaded because running scripts is disabled on this system. For more
information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
Pls, why is it disabled and am I safe to change execution policy?
Thank you.
It works!
Hi Sahil, thanks for sharing!
Why is it necessary to create a virtual environment to run Flask?
It is a good approach to create virtual environment whenever you start a new project. So that no two libraries cause conflict with each other.
For example:
If one project uses Django==1.0.1 and other uses Django==3.0.0. so you have to create the virtual environment for both the project so that you can run them smoothly else one of them will cause problem
When I want to install I get:
Requirement already satisfied: Flask in user / lib / python3 / dist-packages (1.1.2)
Help