Flask site can't get static files
I developed a website using flask and in my computer everthing runs ok using localhost. But when i deploy the code it returns 404 to every static file.
The server codes is basic like this excluding what don't makes difference:
app = Flask(__name__, template_folder='templates', static_folder='static')
@app.route('/')
def index():
if 'logged_in' in session and session['logged_in'>:
credits = database.get_user_credit(session['username'>)
free_roll = database.is_free_roll(session['username'>)
session['credits'> = credits
else:
free_roll = False
credits = 0
return render_template('index.html', translate=keys['translate'>, credits=credits, free_roll=free_roll)
and in my html i call the statics file like this:
I'm pretty sure the code is correct cause when running in localhost no problem show up, and i more than double check if the code is similar and the folder structures aswell.
So, if someone could help I would be very grateful.
Please sign in to leave a comment.
Comments
0 comments