django media url is not resolved in 500 internal server error template

Posted by Tom Tom on Stack Overflow See other posts from Stack Overflow or by Tom Tom
Published on 2010-04-05T17:18:53Z Indexed on 2010/04/05 17:23 UTC
Read the original article Hit count: 389

Filed under:
|

Hi,

I'm using a 500.html template for my app, which is an identical copy of the 404.html with some minor text changes.

Interestingly the {{ media_url }} context variable will not be resolved by the server if the 500.html is presented (e.g. when I force an internal server error), resulting in a page without any css loaded.

An easy way to circumvent this would be to hardcode the links to the css, but I m just curious why the media_url is not resolved. Probably it is because the server encounters a internal server error and that leads to context variables not any more available!?

© Stack Overflow or respective owner

Related posts about django

Related posts about 500-error