Forums

Bootstrap CSS not found while hosting

I am trying to make an admin panel that includes some database. I have used flask-admin to automatically generate admin panel. When I ran the server locally in my PC, the bootstrap swatch is loading and works fine. However, when I hosted it in pythonanywhere and ran, it shows that the CSS is not found as shown in the image.

I have not used any templates of my own for admin panel. I used the following code to automatically generate the template.

admin = Admin(app, name='Admin Panel', template_mode='bootstrap3') Link for the error message https://imgur.com/M83op0k

You need to serve the bootstrap static files. See http://help.pythonanywhere.com/pages/StaticFiles/

Hi, i am in the same problem .. i am no able to figure how to serve static files from a 3rd party package. Please give some directions.

Regards

Check the error log of the web app, or have a look at Network in the developer tools in the browser and find requests to static files that are failing to establish the paths, then add static files mappings on the Web page.