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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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.