R
Railway17mo ago
ferret

flask css error

I'm getting a lot of 404s on the styling for this website hosted with flask. It was working earlier with flask a week earlier.
Solution:
url_for() is the sane way to do it. As flask knows where that is
Jump to solution
11 Replies
Percy
Percy17mo ago
Project ID: de3e66ba-9af6-4857-8329-5e7ab7706ccf
ferret
ferretOP17mo ago
de3e66ba-9af6-4857-8329-5e7ab7706ccf I'm not using url_for links but I am using static_folder when initializing the flask object
Solution
MantisInABox
MantisInABox17mo ago
url_for() is the sane way to do it. As flask knows where that is
ferret
ferretOP17mo ago
okay I'll give it a go
MantisInABox
MantisInABox17mo ago
And the same thing works for the templates folder. Just call the template by it’s location, no need to set the directory manually Just sayin
ferret
ferretOP17mo ago
got it
MantisInABox
MantisInABox17mo ago
Did that work for you @ferretcode?
ferret
ferretOP17mo ago
yes I forgot to come back to this lol thanks
MantisInABox
MantisInABox17mo ago
Awesome! Glad to hear it. No worries man. Flask is so barebones compared to Django. But it’s so smart too
ferret
ferretOP17mo ago
yeah
MantisInABox
MantisInABox17mo ago
Glad we were able to fix it for you
Want results from more Discord servers?
Add your server