from django import http from django.template import RequestContext, loader
from urls import site_context def display_404(request): custom_dict = {'request_path': request.path} custom_dict.update(site_context) t = loader.get_template('404.html') return http.HttpResponseNotFound(t.render(RequestContext(request, custom_dict))) That code works but it seems ugly. I have a feeling I am managing my static media incorrectly. On Sep 11, 7:17 pm, jake elliott <[EMAIL PROTECTED]> wrote: > hi ryan, > > how about a context processor? > > http://www.djangoproject.com/documentation/templates_python/#writing-... > > -jake > > Ryan K wrote: > > Hi. All URLs in my templates are preceded by variables I added to the > > settings file so I could easily deploy my site on many different URLs, > > this includes CSS file URLs. When the custom error 404 page comes up, > > there is obviously no style because I can't pass the setting to it. Is > > there a way to hook into the mechanism to allow the 404 page to the > > get the URL of the stylesheet? Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---