[FIXED] Flask static files getting 404


I am building a basic web app with the following project structure. The app is fine, but I’m getting 404 errors on some static files.

I don’t have a file like this bootstrap.css.map and I can’t find enough documentation related to this in Flask. - - [09/Feb/2014 22:37:17] "GET /static/css/bootstrap.css.map HTTP/1.1" 404 -

Def index():
Print with "/"
return send_file('templates/login.html')

Directory structure:

│ └──bootstrap.min.css
│ └── index.html
└── app.py

EDIT: Here is my login HTML

API test application

……simple login form…………


Set _static_folder location against Flask.

app = Flask(__name__)
app._static_folder = <path to to your static directory>

Answered By – Bitmap

Answer Checked By – David Goodson (Easybugfix Volunteer)

Leave a Reply

(*) Required, Your email will not be published