K
K
kunjut192019-12-29 02:31:22
Flask
kunjut19, 2019-12-29 02:31:22

Why aren't files from the static folder included in a Flask application?

Learn Flask from YouTube videos. And there is one problem that I can’t solve in any way - files (css, js, images) from the static folder via url_for. At the moment I have exactly the same code as in this video , but js and css files are not included, although no errors are issued in debugging mode. And this is the third author in whose lessons I dwell on the moment of connecting static files. From which I concluded that the problem is in the permission to access files (and definitely not my typos). Because the styles don't change, the script doesn't work. But url_forit works great when redirecting to other routes. What could be the problem?
PS I'm doing all this on a macbook

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2019-12-29
@sergey-gornostaev

The problem is learning from the video, read the textbook.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question