List Info

Thread: Server error/Template Context processors




Server error/Template Context processors
country flaguser name
United States
2007-11-06 04:14:20
Hi. When there is a server error (error 500 returns) the
template
context processors don't seem to be doing anything (not
passed to the
template).

I have this template context processor:

import llcom.settings

def site_context(request):
    """ Add URL prefixes from settings file
to request context """
    site_context = {
        'link_prefix': llcom.settings.LINK_PREFIX,
        'static_prefix': llcom.settings.STATIC_PREFIX,
        'no_flash': request.LANGUAGE_CODE in
llcom.settings.NO_FLASH_LANGUAGES,
    }
    return site_context

and this in my settings:

TEMPLATE_CONTEXT_PROCESSORS = (
    'llcom.custom_cp.site_context',
    'django.core.context_processors.auth',
    'django.core.context_processors.debug',
    'django.core.context_processors.i18n',
    'django.core.context_processors.media',
)

'static_prefix' is where my media is. But when a 500 error
occurs, the
'static_prefix' (as well as 'link_prefix') settings aren't
making it
to the template and style sheets are applied. 404 errors are
fine. Any
reason for this?

Thanks,
Ryan


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )