I would like a way to to adjust settings  based on information in the
http header.  I've seen a similar question asked before, but I don't
need all the django request object, just the http header information.
More specifically, user_agent, http_host, and path_info.

Here are two examples of the sort of things  I would like to do:

# use iphone template  if appropriate
if  http_header['USER_AGENT'].find('iphone'):
    TEMPLATE_DIRS = (
         os.path.join(cur_dir_path, 'template_sets/' +  'iphone'),

# set SITE_ID for MyOtherDomain.com
if http_header["HTTP_HOST"].find('myotherdomain.com'):
    SITE_ID = 2

Does anyone know if this can be done?

Thanks,  Greg



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

Reply via email to