How to check the HTTP_HOST from templates/404.html when using flat pages

28 views
Skip to first unread message

tiff

unread,
Feb 5, 2012, 10:54:28 PM2/5/12
to Django users
Hi,
I am using flatpages and I have a 404.html in my templates directory.
I need the 404 page to extend different templates depending on the
HTTP_HOST (the same app is delivering pages for multiple domains).
What's the easiest way to achieve this from the 404 page without
overriding the 404 handler?
Is there a built in tagname?
TIA
Steve

tiff

unread,
Feb 6, 2012, 4:08:06 PM2/6/12
to django...@googlegroups.com
I must have been tired!
Simply added code to existing context processor to provide request.META['HTTP_HOST'] as a variable in the returned dictionary.
Doh!
Reply all
Reply to author
Forward
0 new messages