Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#19701 closed Uncategorized (worksforme)

error500 default view don't include STATIC_URL

Reported by: hugo.arregui@… Owned by: nobody
Component: Generic views Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no



i was playing with this behaviour when I found this:

error500 is the only default view which doesn't use RequestContext, then, STATIC_URL is not included.

Is there a reason for that?


Change History (3)

comment:1 Changed 9 years ago by anonymous

A friend point me to:

But this is a problem.. maybe the default view could insert STATIC_URL from settings without RequestContext?

comment:2 Changed 9 years ago by Mark Lavin

Resolution: worksforme
Status: newclosed

The reason why it does not use a RequestContext is already documented

The default 500 view passes no variables to this template and is rendered with an empty Context to lessen the chance of additional errors.

You can still use the get_static_prefix or static to reference static files without a RequestContext.

comment:3 Changed 8 years ago by Mike Lissner

Is it just me, or should we try to document this better? Maybe add it as part of the static configuration page? It's a big gotcha for somebody that's made their 500 page, and has it depend on their base template, where the {{ STATIC_URL }} will work the rest of the time.

Note: See TracTickets for help on using tickets.
Back to Top