On 21/04/15 23:49,
Egon.F...@gmx.de wrote:
> settings.py contains ALLOWED_HOSTS with the host in the form
> ".
example.com". With DEBUG = True I get the complete page. But if I set
> DEBUG = False the static files are not found so I get only the content.
Django does not serve static files if DEBUG=False, and you really don't
want to do that.
> If DEBUG = True the apache access log the static files are shown with
> HTTP-code 200. If DEBUG = False Apache is looking for the static files
> two times. The first try gives status code 301, the second try gives
> status code 500.
>
> Any idea why this happens?
It's a bad idea to serve statics with Django.
It's ok for debugging, but not for production.
If you already use apache serve static files with Apache directly.
--
Florian