+ 2
Where to use flask (PYTHON / WEB)
Where would I use flask on a website? Like, how would I tell the website I'm using flask? Does it need to be inside the code or do I need to put it elsewhere?
11 odpowiedzi
+ 1
Websites got 2 things
Clients and server.
Clients are web browsers like Chrome, safari etc. that run your html code.
Server is a computer that stays running 24x7 and serves websites(that html code) to clients.
Now, Flask runs on your server.
It's very easy to be honest.
Just creat an app.py file( flask code) and an index.html (your website code).
Now run that app.py file and keep it running.
That's it, you'll have a website 😉.
Now this website will only work on your computer to make that website show up for everyone else you need domain and a hosting server.
Hope it help!
+ 2
Flask is a small web framework written in python
+ 2
Flask is a web server and needs to be running to use it. In most cases, you have it setup and just leave it running on whatever computer. It will run on Windows/Linux/Mac whatever.
Once the Flask server is running, you'll have to setup your navigation and build your various web pages.
You'll need to find a tutorial about all this. But once you get it running, you'll find it fairly easy to work with.
If you are running it on your own PC, you'll want to "start" the server (flask). Then you can reach it with the address/port using your browser.
+ 1
I thought it also lets you write Python code in web development?
+ 1
yes, it's a python framework. but you can try django as well. it's more beginner friendly, but very great and useful
+ 1
ok but how do i use it?
+ 1
Finally someone who actually gets the question, thanks
+ 1
And I only need it to work on mine for now anyways
+ 1
Xmosity glad it helps. Lately I have been using Flask a lot myself. Usually, I do it using Nodejs and express but a lot of my work projects have python only codebases therefore in those projects I end up using Flask.
Here's a helpful starter Flask template. Hope it helps.
https://github.com/NeetishRaj/python-flask-server
0
it has a great, well written documentation
0
this not the place for advertising, but you can find a link under my profile -> see activity -> highlights -> projects -> MNY::development
it's written in python-django, using bootstrap and tailwindcss