For the iPhone templates issue, I'd set up two projects instead of one  
-- one for regular browsers, one for the iPhone. Then I'd simply  
redirect from the regular one to the iPhone one as needed. Although  
this has the negative side effect of having more than one URL per  
resource, but you could also customize content visibility.

Same for the second example -- normally one project is set up per  
domain.

Erik

On 29.08.2008, at 1:24, Greg Fuller wrote:

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