plungerman wrote:

> perfect, just what we needed.  one thing i noticed, however, is that
> this manoeuvre does not work with 404.html and 500.html type pages. 

This is because they use a simple Context, not RequestContext.

> we
> have custom templates for those two errors, and the variable is not
> available in those templates.  anyone have a suggestion how one might
> make the variable available in custom error templates?

You can write your own handlers for those pages which is very easy 
(though a bit annoying).

urls.py:

     handler404 = 'myproject.myapp.views.handler404'

views.py:

     from django.http import HttpResponseNotFound
     from django.template import loader, RequestContext

     def handler404(request):
       template = loader.get_template('404.html')
       context = RequestContext(request)
       return HttpResponseNotFound(template.render(context))

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to