Forums

Images appear broken.

Ever after I turned off debug mode images appear broken even though I configured the location of static files.

example of a page with broken images:

That page looks fine here - have you tried a 'forced refresh' (Control + F5)?

No. That's because I made debug True again so that people can see it.

I made debug False so you can now see the broken images

I'm no great CSS expert, but I see that the image (Eiffel Sunset) is being shown with 'background-size: cover', whereas you may want 'background-size: contain' (in index-jumbotron')?

See for example http://www.w3schools.com/cssref/css3_pr_background-size.asp

Sorry but this is irrelevant to my problem:

The website looks fine and all images appear okay. However, when I switch debug mode in settings.py from True to False my static file are no longer accessible. I did some research and the solution is to set the Static path under the Web tab and that's what i did but with no luck.

Ah sorry, I thought you were talking about the image display problem.

Hopefully a PA person will help re. the static file access.

Should I wait for someone to get back to me? how long will that take?

They check the Forum quite frequently, but you could also message them using the Send feedback link at the top of the page.

Hi excurj

sorry we are a bit late to respond this time- easter weekend and all.

I'm guessing you did all this already, but just to make sure: 1. did you check your error log for any errors? (i'm thinking maybe something like allowed hosts?) 2. are you reloading your webapp after each change in settings.py?

I'm quite sure that the static files stuff (if setup right) should serve the files regardless of debug mode- afterall, it serves the files without going into your django code (eg: it does the same for a flask app). The whole point is that it is faster that way (without the overhead of the django stuff).