even more browser

This commit is contained in:
j 2011-12-03 18:03:55 +01:00
parent a57be2614c
commit f8c85107e8

View file

@ -48,6 +48,8 @@ class SessionData(models.Model):
'Internet Explorer' 'Internet Explorer'
'Webkit', 'Webkit',
'Safari', 'Safari',
'MeeGo',
'Android',
'Chrome', 'Chrome',
'Firefox', 'Firefox',
'Safari Mobile', 'Safari Mobile',
@ -56,10 +58,16 @@ class SessionData(models.Model):
if { if {
'Safari Mobile': 'Mobile/', 'Safari Mobile': 'Mobile/',
'Internet Explorer': 'MSIE', 'Internet Explorer': 'MSIE',
}.get(browser, browser) in self.useragent: }.get(browser, browser) in self.useragent:
self.browser = browser self.browser = browser
for system in ('Windows', 'Mac OS X', 'Andorid', 'iOS', 'Linux'): for system in (
'Windows',
'Mac OS X',
'iOS',
'Linux',
'Andorid',
'MeeGo',
):
if { if {
}.get(system, system) in self.useragent: }.get(system, system) in self.useragent:
self.system = system self.system = system