You can use tg.useragent for that purpose:
http://docs.turbogears.org/1.0/stdvars#standard-variables
-- Christoph
sure you can. Something like this would detect IE 6 (very simply speaking)
from cherrypy import request
def isIE6():
if request.headers.get('user-agent','').find('MSIE 6') > 0:
return True
return False
and if you want to use it in templates, put this into your stdvars.py:
from wherever-it-is import isIE6
def add_custom_stdvars(vars):
vars.update({"isIE6":isIE6})
return vars
turbogears.view.variable_providers.append(add_custom_stdvars)
then you can use it as <div py:if="tg.isIE6()"> ... </div>
HTH
Uwe