diff --git a/config/siteconfig.py b/config/siteconfig.py index c4d8f8bf..a1535eca 100644 --- a/config/siteconfig.py +++ b/config/siteconfig.py @@ -205,6 +205,7 @@ ROOT_URLCONF = 'routemap.sites.urls' TEMPLATE_LOADERS = ( + 'django_mobile.loader.Loader', 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', ) @@ -212,6 +213,9 @@ MIDDLEWARE_CLASSES = ( 'localeurl.middleware.LocaleURLMiddleware', 'django.middleware.common.CommonMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django_mobile.middleware.MobileDetectionMiddleware', + 'django_mobile.middleware.SetFlavourMiddleware' ) TEMPLATE_DIRS = ( @@ -222,13 +226,15 @@ 'django.core.context_processors.request', 'django.core.context_processors.i18n', 'django.core.context_processors.media', - 'routemap.util.context_processors.pageinfo' + 'routemap.util.context_processors.pageinfo', + 'django_mobile.context_processors.flavour' ) INSTALLED_APPS = ( 'localeurl', 'django.contrib.markup', 'markupfilter', + 'django_mobile' ) diff --git a/django/contrib/minidetector/__init__.py b/django/contrib/minidetector/__init__.py deleted file mode 100644 index 96f2251a..00000000 --- a/django/contrib/minidetector/__init__.py +++ /dev/null @@ -1,52 +0,0 @@ - -from useragents import search_strings - -class Middleware(object): - @staticmethod - def process_request(request): - """Adds a "mobile" attribute to the request which is True or False - depending on whether the request should be considered to come from a - small-screen device such as a phone or a PDA""" - - if request.META.has_key("HTTP_X_OPERAMINI_FEATURES"): - #Then it's running opera mini. 'Nuff said. - #Reference from: - # http://dev.opera.com/articles/view/opera-mini-request-headers/ - request.mobile = True - return None - - if request.META.has_key("HTTP_ACCEPT"): - s = request.META["HTTP_ACCEPT"].lower() - if 'application/vnd.wap.xhtml+xml' in s: - # Then it's a wap browser - request.mobile = True - return None - - if request.META.has_key("HTTP_USER_AGENT"): - # This takes the most processing. Surprisingly enough, when I - # Experimented on my own machine, this was the most efficient - # algorithm. Certainly more so than regexes. - # Also, Caching didn't help much, with real-world caches. - s = request.META["HTTP_USER_AGENT"].lower() - for ua in search_strings: - if ua in s: - request.mobile = True - return None - - #Otherwise it's not a mobile - request.mobile = False - return None - -def detect_mobile(view): - """View Decorator that adds a "mobile" attribute to the request which is - True or False depending on whether the request should be considered - to come from a small-screen device such as a phone or a PDA""" - - def detected(request, *args, **kwargs): - Middleware.process_request(request) - return view(request, *args, **kwargs) - detected.__doc__ = "%s\n[Wrapped by detect_mobile which detects if the request is from a phone]" % view.__doc__ - return detected - - -__all__ = ['Middleware', 'detect_mobile'] diff --git a/django/contrib/minidetector/search_strings.txt b/django/contrib/minidetector/search_strings.txt deleted file mode 100644 index 593ebf50..00000000 --- a/django/contrib/minidetector/search_strings.txt +++ /dev/null @@ -1,63 +0,0 @@ -# Adapted from http://pub.mowser.com/wiki/Main/CodeExamples -# With a few additions by Moof -# The latest version of this file is always available from: -# http://minidetector.googlecode.com/svn/trunk/minidetector/search_strings.txt -# -# This list is public domain, please feel free to use it for your own projects -# If HTTP_USER_AGENT.lower() contains any of these strings, it's a mobile -# Also include some games consoles, see below -sony -symbian -nokia -samsung -mobile -windows ce -epoc -opera mini -nitro -j2me -midp- -cldc- -netfront -mot -up.browser -up.link -audiovox -blackberry -ericsson, -panasonic -philips -sanyo -sharp -sie- -portalmmm -blazer -avantgo -danger -palm -series60 -palmsource -pocketpc -smartphone -rover -ipaq -au-mic, -alcatel -ericy -up.link -docomo -vodafone/ -wap1. -wap2. -plucker -480x640 -sec -fennec -android -# The Google transcoder -google wireless transcoder -# These are games consoles that either have a small screen or display on a -# TV. Best to treat them as mobiles for web display -nintendo -webtv -playstation diff --git a/django/contrib/minidetector/tests/__init__.py b/django/contrib/minidetector/tests/__init__.py deleted file mode 100644 index ebd61828..00000000 --- a/django/contrib/minidetector/tests/__init__.py +++ /dev/null @@ -1,77 +0,0 @@ -from unittest import TestSuite, TestCase, TextTestRunner, TestLoader - -import minidetector - -import os.path - - -class DummyRequest(object): - def __init__(self, useragent): - self.META = {'HTTP_USER_AGENT': useragent} - -class TestHTTPHeaders(TestCase): - """Everything that Isn't a User-Agent Header""" - def test_wap(self): - request = DummyRequest("Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b5) Gecko/20051019 Flock/0.4 Firefox/1.0+") - request.META['HTTP_ACCEPT'] = 'application/vnd.wap.xhtml+xml' - minidetector.Middleware.process_request(request) - self.assert_(request.mobile, "WAP not Detected") - - def test_opera_mini(self): - request = DummyRequest("Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b5) Gecko/20051019 Flock/0.4 Firefox/1.0+") - request.META['HTTP_X_OPERAMINI_FEATURES'] = 'secure' - minidetector.Middleware.process_request(request) - self.assert_(request.mobile, "Opera Mini not Detected") - - - -def MobileDetectionFactory(uas, expected): - class MobileDetection(TestCase): - - def testUA(self, ua): - request = DummyRequest(ua) - minidetector.Middleware.process_request(request) - if self.expected: - self.assert_(request.mobile, - "Mobile Not Detected: %s" % ua) - else: - self.assert_(not request.mobile, - "Mobile Falsely Detected: %s" % ua) - def testnum(num): - def test(self): - return self.testUA(self.uas[num]) - return test - MobileDetection.uas = uas - MobileDetection.expected = expected - suite = TestSuite() - for x in range(len(uas)): - if not uas[x].startswith('#'): - setattr(MobileDetection, 'test%s'%x, testnum(x)) - suite.addTest(MobileDetection('test%s' % x)) - return suite - - -def suite_from_file(filename, expected): - f = None - try: - f = open(os.path.join(os.path.dirname(__file__), filename)) - uas = f.readlines() - finally: - if f: - f.close() - - suite = MobileDetectionFactory(uas=uas, expected=expected) - return suite - - -def gen_suite(): - suite = TestSuite() - suite.addTest(suite_from_file('mobile_useragents.txt', True)) - suite.addTest(suite_from_file('other_useragents.txt', False)) - suite.addTests(TestLoader().loadTestsFromTestCase(TestHTTPHeaders)) - return suite - -suite = gen_suite() - -if __name__ == "__main__": - TextTestRunner().run(suite) \ No newline at end of file diff --git a/django/contrib/minidetector/tests/mobile_useragents.txt b/django/contrib/minidetector/tests/mobile_useragents.txt deleted file mode 100644 index 93f81925..00000000 --- a/django/contrib/minidetector/tests/mobile_useragents.txt +++ /dev/null @@ -1,180 +0,0 @@ -# This list adapted from http://www.zytrax.com/tech/web/mobile_ids.html -Mozilla/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3A100a Safari/419.3 -BlackBerry/3.6.0 -Nokia7600/2.0 (03.01) Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0) -Plucker/Py-1.4 -J-PHONE/5.0/V801SA/SN123456789012345 SA/0001JP Profile/MIDP-1.0 -SonyEricssonT200/R101 -SIE-S65/12 UP.Browser/7.0.0.1.c3 (GUI) MMP/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Link/5.1.2.16 -SIE-ME45/05 UP.Browser/5.0.1.1.102 (GUI) -SIE-S55/16 UP.Browser/6.1.0.5.c.4 (GUI) MMP/1.0 UP.Link/5.1.2.10 -#ReqwirelessWeb/3.2 S55 -SonyEricssonK610i/R1CB Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1 -SonyEricssonK608i/R2L/SN356841000828910 Browser/SEMC-Browser/4.2 Profile/MIDP-2.0 Configuration/CLDC-1.1 -SonyEricssonK550i/R1JD Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1 -SonyEricssonW850i/R1ED Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1 -Opera/8.01 (J2ME/MIDP; Opera Mini/2.0.4509/1558; en; U; ssr) -SonyEricssonK610i/R1CB Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Link/6.2.3.15.0 -Mozilla/4.1 (compatible; MSIE5.0; Symbian OS); Opera 6.02 [de] -Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; Sprint:PPC-6700; PPC; 240x320) -Mozilla/4.0 (compatible; MSIE 5.5; Windows CE; PPC; 240x320) -Vodafone/1.0/HTC_prophet/2.15.3.113/Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x320) -Mozilla/4.76 [en] (PalmOS; U; WebPro/3.0.1a; Palm-Cct1) -Mozilla/2.0 (compatible; MSIE 3.02; Windows CE; 240x320) -Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; MSN Companion 2.0; 800x600; Compaq) -#AU-MIC/1.1.4.0 20722 MMP/2.0 -#Mozilla/4.74 [en] (X11; I; ProxiNet) -#Mozilla/2.0 (compatible; Elaine/3.0) -BlackBerry7230/3.7.0 -BlackBerry7230/3.7.1 -BlackBerry7730/3.7.0 -BlackBerry7730/3.7.1 UP.Link/5.1.2.5 -LG-LX550 AU-MIC-LX550/2.0 MMP/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 -LGE-CX5450 UP.Browser/6.2.2.3.d.1.103 (GUI) MMP/2.0 -portalmmm/2.0 N410i(c20;TB) -Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; O2 Xda 2mini; PPC; 240x320) -Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; Smartphone; 240x320; SPV C600; OpVer 11.1.3.5) -Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x320; SPV M2000; OpVer 5.31.1.124) -Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; Smartphone; 176x220; SPV C500; OpVer 4.1.3.0) -Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; Smartphone; 176x220) -Mozilla/4.0 (compatible; MSIE 6.0; Windows CE) -Mozilla/4.51 (compatible; Opera 3.62; EPOC; 640x480) -EPOC32-WTL/2.0 (VGA) STNC-WTL/2.0(230) -Opera/8.01 (J2ME/MIDP; Opera Mini/1.1.2277/lofi/nordic/int; O2 Xda II; en; U; ssr) -SonyEricssonP800/R101 Profile/MIDP-1.0 Configuration/CLDC-1.0 -SonyEricssonP900/R101 Profile/MIDP-2.0 Configuration/CLDC-1.0 -SonyEricssonT610/R201 Profile/MIDP-1.0 Configuration/CLDC-1.0 -Mozilla/3.0 (compatible; AvantGo 3.2) -Nokia6800/2.0 (4.17) Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/5.1.2.9 -SHARP-TQ-GX10i/1.0 Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Browser/6.1.0.6.1.d.1 (GUI) MMP/1.0 -Mozilla/5.0 (compatible; AvantGo 3.2; ProxiNet; Danger hiptop 1.0) -DoCoMo/1.0/P502i/c10 (Google CHTML Proxy/1.0) -DoCoMo/2.0 SH901iC(c100;TB;W24H12) -DoCoMo/1.0/N503is/c10 -KDDI-KC31 UP.Browser/6.2.0.5 (GUI) MMP/2.0 -UP.Browser/3.04-TS14 UP.Link/3.4.4 -Vodafone/1.0/V802SE/SEJ001 Browser/SEMC-Browser/4.1 -SEC-SGHD410 -#Mozilla/3.0(DDIPOCKET;JRC/AH-J3001V,AH-J3002V/1.0/0100/c50)CNF/2.0 -#PDXGW/1.0 (TX=8;TY=6;GX=96;GY=64;C=G2;G=B2;GI=0) -#ASTEL/1.0/J-0511.00/c10/smel -Mozilla/1.22 (compatible; MSIE 5.01; PalmOS 3.0) EudoraWeb 2.1 -Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x320) -Mozilla/2.0 (compatible; MSIE 3.02; Windows CE; PPC; 240x320) -Mozilla/5.0 (Windows; U; Windows CE 5.1; rv:1.8.1a3) Gecko/20060610 Minimo/0.016 -OPWV-SDK UP.Browser/7.0.2.3.119 (GUI) MMP/2.0 Push/PO -UP.Browser/6.1.0.1.140 (Google CHTML Proxy/1.0) -Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PalmSource/Palm-D050; Blazer/4.3) 16;320x320) -Mozilla/4.76 [en] (PalmOS; U; WebPro/3.0; Palm-Arz1) -Mozilla/4.76 (compatible; MSIE 6.0; U; Windows 95; PalmSource; PalmOS; WebPro; Tungsten Proxyless 1.1 320x320x16) -Mozilla/4.0 (compatible;MSIE 6.0;Windows95;PalmSource) Netfront/3.0;8;320x320 -Mozilla/4.0 (compatible;MSIE 6.0;Windows95;PalmSource) Netfront/3.0 -Mozilla/4.08 (Windows; Mobile Content Viewer/1.0) NetFront/3.2 -Mozilla/4.0 (PDA; PalmOS/sony/model crdb/Revision:1.1.36(de)) NetFront/3.0 -Mozilla/4.0 (PDA; PalmOS/sony/model prmr/Revision:1.1.54 (en)) NetFront/3.0 -Mozilla/4.0 (PDA; SL-C750/1.0,Embedix/Qtopia/1.3.0) NetFront/3.0 Zaurus C750 -#WM5 PIE -#Xiino/1.0.9E [en] (v. 4.1; 153x130; g4) -BlackBerry8320/4.3.1 Profile/MIDP-2.0 Configuration/CLDC-1.1 -BlackBerry8830/4.2.2 Profile/MIDP-2.0 Configuration/CLOC-1.1 VendorID/105 -BlackBerry7100i/4.1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/103 -BlackBerry8703e/4.1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/105 -BlackBerry7130e/4.1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/104 -BlackBerry7250/4.0.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 -Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x320; HP iPAQ h6300) -MOT-V3r/08.BD.43R MIB/2.2.1 Profile/MIDP-2.0 Configuration/CLDC-1.1 -MOT-V3i/08.B4.34R MIB/2.2.1 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Link/6.3.0.0.0 -MOT-A-1C/01.01 UP.Browser/7.0.0.2.c.1.104 (GUI) MMP/2.0 UP.Link/5.1.2.16 -MOT-V620/0E.65.25R MIB/2.2.1 Profile/MIDP-2.0 Configuration/CLDC-1.0 UP.Link/6.3.1.12.0 -MOT-V600/0B.09.38R MIB/2.2 Profile/MIDP-2.0 Configuration/CLDC-1.0 -MOT-E398/0E.20.97R MIB/2.2.2 Profile/MIDP-2.0 Configuration/CLDC-1.1 -mot-V3/OE.40.79R MIB/2.2.1 profile/MIDP-2.0 configuration/CLDC-1.0 UP.Link/6.2.3.15.0 -Mozilla/2.0 (compatible; MSIE 3.02; Windows CE; Smartphone; 176x220) -Nokia3200/1.0 (5.29) Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/6.3.1.13.0 -Nokia3510i/1.0 (04.44) Profile/MIDP-1.0 Configuration/CLDC-1.0 -Nokia3650/1.0 SymbianOS/6.1 Series60/1.2 Profile/MIDP-1.0 Configuration/CLDC-1.0 -Mozilla/4.0 (compatible; MSIE 4.0; SmartPhone; Symbian OS/1.1.0) Netfront/3.1 -Nokia5140/2.0 (3.10) Profile/MIDP-2.0 Configuration/CLDC-1.1 -Nokia6230/2.0+(04.43)+Profile/MIDP-2.0+Configuration/CLDC-1.1+UP.Link/6.3.0.0.0 -Nokia6630/1.0 (2.3.129) SymbianOS/8.0 Series60/2.6 Profile/MIDP-2.0 Configuration/CLDC-1.1 -Mozilla/4.1 (compatible; MSIE 5.0; Symbian OS; Nokia 6600;432) Opera 6.10 [en] -Nokia6600/1.0 (5.27.0) SymbianOS/7.0s Series60/2.0 Profile/MIDP-2.0 Configuration/CLDC-1 -Nokia6680/1.0 (4.04.07) SymbianOS/8.0 Series60/2.6 Profile/MIDP-2.0 Configuration/CLDC-1.1 -Mozilla/4.1 (compatible; MSIE 5.0; Symbian OS; Nokia 6600;452) Opera 6.20 [en-US] -Nokia7250/1.0 (3.14) Profile/MIDP-1.0 Configuration/CLDC-1.0 -Nokia7610/2.0 (5.0509.0) SymbianOS/7.0s Series60/2.1 Profile/MIDP-2.0 Configuration/CLDC-1.0 -Nokia8310/1.0 (05.11) UP.Link/6.5.0.0.06.5.0.0.06.5.0.0.06.5.0.0.0 -Mozilla/4.0 (compatible; MSIE 5.0; Symbian )S) Opera 6.0[en]Nokia/Series-9300 -Mozilla/4.0 (compatible; MSIE 5.0; Series80/2.0 Nokia9300/05.22 Profile/MIDP-2.0 Configuration/CLDC-1.1) -Mozilla/4.0 (compatible; MSIE 5.0; Series80/2.0 Nokia9500/4.51 Profile/MIDP-2.0 Configuration/CLDC-1.1) -Mozilla/5.0 (SymbianOS/9.1; U; en-us) AppleWebKit/413 (KHTML, like Gecko) Safari/413 -Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1 NokiaE90-1/07.24.0.3; Profile/MIDP-2.0 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko) Safari/413 UP.Link/6.2.3.18.0 -Opera/8.01 (J2ME/MIDP; Opera Mini/3.0.6306/1528; en; U; ssr) -NokiaN80-3/1.0552.0.7Series60/3.0Profile/MIDP-2.0Configuration/CLDC-1.1 -NokiaN90-1/3.0545.5.1 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1 -Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1 NokiaN95/10.0.018; Profile/MIDP-2.0 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko) Safari/413 -NokiaN-Gage/1.0 SymbianOS/6.1 Series60/1.2 Profile/MIDP-1.0 Configuration/CLDC-1.0 -Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PalmSource/Palm-TunX; Blazer/4.3) 16;320x448 -Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PalmSource/hspr-H102; Blazer/4.0) 16;320x320 -Mozilla/4.0 (compatible; MSIE 6.0; Windows 95; PalmSource; Blazer 3.0) 16;160x160 -UPG1 UP/4.0 (compatible; Blazer 1.0) -MobileExplorer/3.00 (Mozilla/1.22; compatible; MMEF300; Amstrad; Gamma) -Mozilla/2.0 (compatible ; MSIE 3.02; Windows CE; PPC; 240x320) -Mozilla/4.0(compatible; MSIE 4.01; Windows CE; PPC; 240x320) -SAGEM-myX5-2/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.0 UP.Browser/6.2.2.6.d.3 (GUI) MMP/1.0 -SCH-A950+UP.Browser/6.2.3.2+(GUI)+MMP/2.0 -SAMSUNG-SGH-D900/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Browser/6.2.3.3.c.1.101 (GUI) MMP/2.0 -SAMSUNG-SGH-D900/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Browser/6.2.3.3.c.1.101 (GUI) MMP/2.0 UP.Link/6.3.1.12.0 -SEC-SGHE900/1.0 NetFront/3.2 Profile/MIDP-2.0 Configuration/CLDC-1.1Opera/8.01 (J2ME/MIDP; Opera Mini/2.0.4509/1378; nl; U; ssr) -SEC-SGHE600 UP.Link/6.3.1.12.0 -SEC-SGH600 -Mozilla/4.0 (compatible; MSIE 6.0; j2me) ReqwirelessWeb/3.5 -Vodafone/1.0/703SH/SHG001 Browser/UP.Browser/7.0.2.1 Profile/MIDP-2.0 Configuration/CLDC-1.1 Ext-J-Profile/JSCL-1.2.2 Ext-V-Profile/VSCL-2.0.0 -Mozilla/4.0 (PDA; Windows CE/0.9.3) NetFront/3.0 -Mozilla/4.0 (compatible; MSIE 5.0; Linux 2.4.18-rmk7-pxa3-embedix armv5tel; 480x640) Opera 6.0 [en] -Opera/8.01 (J2ME/MIDP; Opera Mini/1.0.1479/HiFi; SonyEricsson P900; no; U; ssr) -SonyEricssonK700i/R2N SEMC-Browser/4.0.1 Profile/MIDP-2.0 Configuration/CLDC-1.1 -Mozilla/4.0 (compatible; MSIE 6.0; Windows 98;PalmSource/Palm-D053; Blazer/4.5) 16;320x320 UP.Link/6.3.1.17.0 -Palm680/RC1 Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PalmSource/Palm-D053; Blazer/4.5) 16;320x320 UP.Link/6.3.1.17.06.3.1.17.0 -#Mozilla/4.0 (compatible; MSIE 5.5; Windows NT) (compatible; MSIE 5.5; Windows NT) -Opera/9.00 (Nintendo Wii; U; ; 1309-9; en) -Mozilla/4.0 (compatible; MSIE 6.0; Nitro) Opera 8.50 [en] -Mozilla/5.0 (PLAYSTATION 3; 1.00) -Mozilla/4.0 (PSP (PlayStation Portable); 2.00) -Mozilla/4.0 WebTV/2.8 (compatible; MSIE 4.0) -Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1C28 Safari/419.3 -Mozilla/4.0 (PS2; PlayStation BB Navigator 1.0) NetFront/3.0 -Mozilla/4.0 (compatible; Linux 2.6.10) NetFront/3.3 Kindle/1.0 (screen 600x800) -Opera/9.10 (Nintendo Wii; U; ; 1621; en) -Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; PPC; 480x640) Opera 8.60 [en] -Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Google Wireless Transcoder;) -Mozilla/5.0 (Windows NT 5.1; rv:2.0b6pre) Gecko/20100902 Firefox/4.0b6pre Fennec/2.0b1pre -Mozilla/5.0 (X11; Linux armv7l; rv:2.0b4pre) Gecko/20100818 Firefox/4.0b4pre Fennec/2.0a1pre -Mozilla/5.0 (X11; Linux armv7l; rv:2.0b4pre) Gecko/20100812 Firefox/4.0b4pre Fennec/2.0a1pre -Mozilla/5.0 (X11; Linux armv7l; rv:2.0b3pre) Gecko/20100730 Firefox/4.0b3pre Fennec/2.0a1pre -Mozilla/5.0 (X11; Linux armv71; en-US; rv:2.0b2pre) Gecko/20100722 Firefox/4.0b2pre Fennec/2.0a1pre -Mozilla/5.0 (X11; Linux armv71; rv:2.0b4pre) Gecko/20100818 Firefox/4.0b4pre Fennec/2.0a1pre -Mozilla/5.0 (X11; U; Linux armv7l; en-US; rv:1.9.2a1pre) Gecko/20090322 Fennec/1.0b2pre -Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1.17) Gecko/20080829 Mozilla/5.0 (X11; U; Linux armv7l; en-US; rv:1.9.2a1pre) Gecko/20090322 Fennec/1.0b2pre -Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090626 Fennec/1.0b2 -Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2a1pre) Gecko/20090317 Fennec/1.0b1 -Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090317 Fennec/1.0b1 -Mozilla/5.0 (X11; U; Linux armv6l; en-US; rv:1.9.1b2pre) Gecko/20081116 Fennec/1.0a2pre -Mozilla/5.0 (X11; U; Linux armv61; en-US; rv:1.9.1b2pre) Gecko/20081116 Fennec/1.0a2pre -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2a1pre) Gecko/20081222 Fennec/1.0a2 -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b4pre) Gecko/20090401 Fennec/1.0a2 -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20090106 Fennec/1.0a2 -Mozilla/5.0 (X11; U; Linux armv6l; en-US; rv:1.9.2a1pre) Gecko/20081222 Fennec/1.0a2 -Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2a1pre) Gecko/20081222 Fennec/1.0a2 -Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20081222 Fennec/1.0a2 -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b2pre) Gecko/20081015 Fennec/1.0a1 -Mozilla/5.0 (X11; U; Linux armv6l; en-US; rv:1.9.1b2pre) Gecko/20081015 Fennec/1.0a1 -Mozilla/5.0 (X11; U; Linux armv61; en-US; rv:1.9.1b2pre) Gecko/20081015 Fennec/1.0a1 -Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b2pre) Gecko/20081015 Fennec/1.0a1 -Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2pre) Gecko/20081015 Fennec/1.0a1 -Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1b2pre) Gecko/20081015 Fennec/1.0a1 -Mozilla/5.0 (X11; U; Linux armv6l; en-US; rv:1.9.1b1pre) Gecko/20081005220218 Gecko/2008052201 Fennec/0.9pre -Mozilla/5.0 (X11; U; Linux armv6l; en-US; rv:1.9.1b1pre) Gecko/20080923171103 Fennec/0.8 -Mozilla/5.0 (X11; U; Linux armv6l; en-US; rv:1.9.1a2pre) Gecko/20080820121708 Fennec/0.7 -Mozilla/5.0 (X11; U; Linux armv6l; en-US; rv:1.9.1a1pre) Gecko/2008071707 Fennec/0.5 -Mozilla/5.0 (Windows; U; Windows CE 5.2; en-US; rv:1.9.2a1pre) Gecko/20090210 Fennec/0.11 diff --git a/django/contrib/minidetector/tests/other_useragents.txt b/django/contrib/minidetector/tests/other_useragents.txt deleted file mode 100644 index d64b2d7d..00000000 --- a/django/contrib/minidetector/tests/other_useragents.txt +++ /dev/null @@ -1,251 +0,0 @@ -# This list adapted from http://www.zytrax.com/tech/web/browser_ids.htm -Lynx/2.6 libwww-FM/2.14 -Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 6.0 [en] -Links (0.95; Unix) -Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.8) Gecko/20071009 SeaMonkey/1.1.5 -Opera/9.00 (Windows NT 5.1; U; en) -Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.3a) Gecko/20021207 Phoenix/0.5 -Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2b) Gecko/20020923 Phoenix/0.1 -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060612 Firefox/1.5.0.4 Flock/0.7.0.17.1 -Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b5) Gecko/20051019 Flock/0.4 Firefox/1.0+ -Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.4) Gecko/20061201 Galeon/2.0.2 (Ubuntu package 2.0.2-4ubuntu1) -Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20051105 Galeon/1.3.21 -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 Galeon/1.3.18 -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Galeon/1.3.17 (Debian package 1.3.17-2) -Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040406 Galeon/1.3.15 -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115 Galeon/1.3.12 -Mozilla/5.0 (X11; U; Linux i686) Gecko/20030422 Galeon/1.3.4 -Mozilla/5.0 Galeon/1.2.0 (X11; Linux i686; U;) Gecko/20020326 -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.1) Gecko/20061205 Iceweasel/2.0.0.1 (Debian-2.0.0.1+dfsg-2) -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060620 Iceweasel/1.5.0.4-g1 -Mediapartners-Google/2.1 -Google-Sitemaps/1.0 -Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser; Deepnet Explorer 1.5.3; Smart 2x2; Avant Browser; .NET CLR 2.0.50727; InfoPath.1) -Mozilla/3.0 (x86 [en] Windows NT 5.1; Sun) -Mozilla/4.5 RPT-HTTPClient/0.3-2 -Jakarta Commons-HttpClient/2.0.1 -IBrowse/2.3 (AmigaOS V51) -IBrowse/2.3 (AmigaOS 4.0) -iCab/2.9.7 (Macintosh; U; PPC) -iCab/2.9.5 (Macintosh; U; PPC; Mac OS X) -Mozilla/4.5 (compatible; iCab 2.7.1; Macintosh; I; PPC) -ipd/1.0 from AlertSite.com -ICE Browser/5.05 (Java 1.4.0; Windows 2000 5.0 x86) -Mozilla/5.0 (X11; Linux x86_64; U;) Gecko/20060207 Kazehakase/0.3.5 Debian/0.3.5-1 -Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; KKman2.0) -Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.7) Gecko/20060917 K-Meleon/1.02 -Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7.5) Gecko/20041220 K-Meleon/0.9 -Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031016 K-Meleon/0.8.2 -Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031016 K-Meleon/0.8.2 -Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.5) Gecko/20031016 K-Meleon/0.8 -Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.2b) Gecko/20021016 K-Meleon 0.7 -Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.5) Gecko/20011011 -Mozilla/5.0(Windows;N;Win98;m18)Gecko/20010124 -Mozilla/5.0 (compatible; Konqueror/3.92; Microsoft Windows) KHTML/3.92.0 (like Gecko) -Mozilla/5.0 (compatible; Konqueror/3.5; Darwin) KHTML/3.5.6 (like Gecko) -Mozilla/5.0 (compatible; Konqueror/3.5; Darwin 8.10.0; X11; Power Macintosh; en_US)KHTML/3.5.6 (like Gecko) -Mozilla/5.0 (compatible; Konqueror/3.5; Linux; X11; x86_64) KHTML/3.5.6 (like Gecko) (Kubuntu) -Mozilla/5.0 (compatible; Konqueror/3.4; CYGWIN_NT-5.1) KHTML/3.4.89 (like Gecko) -Mozilla/5.0 (compatible; Konqueror/3.5; Linux 2.6.14-kanotix-6; X11) KHTML/3.5.3 (like Gecko) (Debian package 4:3.5.3-1) -Mozilla/5.0 (compatible; Konqueror/3.5; Linux; X11; i686; en_US) KHTML/3.5.3 (like Gecko) -Mozilla/5.0 (compatible; Konqueror/3.4; Linux) KHTML/3.4.3 (like Gecko) (Kubuntu package 4:3.4.3-0ubuntu1) -Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) -Mozilla/5.0 (compatible; Konqueror/3.4; FreeBSD) KHTML/3.4.3 (like Gecko) -Mozilla/5.0 (compatible; Konqueror/3.4; Linux 2.6.8; X11; i686; en_US) KHTML/3.4.0 (like Gecko) -Mozilla/5.0 (compatible; Konqueror/3.3; Linux 2.6.8.1-24mdk; X11; i686; en_GB, en_US) (KHTML, like Gecko) -Mozilla/5.0 (compatible; Konqueror/3.3; Linux) (KHTML, like Gecko) -Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.6.7-3ajp; X11; i686) (KHTML, like Gecko) -Mozilla/5.0 (compatible; Konqueror/3.2; FreeBSD) (KHTML, like Gecko) -Mozilla/5.0 (compatible; Konqueror/3.1; Linux 2.4.20) -Mozilla/5.0 (compatible; Konqueror/3.1; Linux; X11; i686) -Mozilla/5.0 (compatible; Konqueror/3.1; Linux 2.4.19-32mdkenterprise; X11; i686; ar, en_US) -Mozilla/5.0 (compatible; Konqueror/2.1.1; X11) -Links (2.1pre18; Linux 2.6.17-dyne i686; x) -Links (2.1pre15; Linux 2.4.26-vc4 i586; x) -Links (2.1pre14; OS/2 1 i386; 80x33) -Links (0.99; OS/2 1 i386; 80x33) -Links (0.98; Linux 2.6.7-rc2 i686; 132x43) -Links (0.98; Unix; 80x25) -Lynx/2.8.5dev.16 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6b -Lynx/2.8.5rel.1 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/1.0.16 -Lynx/2.8.5rel.1 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/0.8.12 -Lynx/2.8.3rel.1 libwww-FM/2.14FM -Lynx/2.8.4dev.11 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6 -Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.1.4322) -PATHWORKS Mosaic/1.0 libwww/2.15_Spyglass -WinMosaic/Version 2.0 (ALPHA 2) -#VMS_Mosaic/3.8-1 (Motif;OpenVMS V7.3-2 DEC 3000 - M700) libwww/2.12_Mosaic -Mosaic from Digital/1.02_Win32 -NCSA Mosaic/2.0.0b4 (Windows AXP) -NCSA_Mosaic/2.7b5 (X11;Linux 2.6.7 i686) libwww/2.12 modified -mMosaic/3.6.6 (X11;SunOS 5.8 sun4m) -#mothra/Jul-10-17:33:30-EDT-2006 -Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.2) Gecko/20070220 Firefox/2.0.0.8 -Mozilla/5.0 (Windows; U; WinNT3.51; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 -Mozilla/5.0 (BeOS; U; BeOS BePC; en-US; rv:1.8.1.8pre) Gecko/20070926 SeaMonkey/1.1.5pre -Mozilla/5.0 (X11; U; Darwin Power Macintosh; en-US; rv:1.8.1.5) Gecko/20070803 SeaMonkey/1.1.3 -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1b2) Gecko/20060823 SeaMonkey/1.1a -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060417 -Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060130 SeaMonkey/1.0 -Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.9a1) Gecko/20051119 MultiZilla/1.8.1.0s SeaMonkey/1.5a -Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20051105 -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920 -Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.12) Gecko/20051009 Debian/1.7.12-1 -Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b4) Gecko/20050910 SeaMonkey/1.0a -Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b3) Gecko/20050713 SeaMonkey/1.0a -Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040704 -Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.7.11) Gecko/20050728 -Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 -Mozilla/5.0+(X11;+U;+Linux+i686;+en-US;+rv:1.7.3)+Gecko/20040922 -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040616 MultiZilla/1.6.3.1d -Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.2) Gecko/20020924 AOL/7.0 -Mozilla/5.0 (Windows; U; Win 9x 4.90) Gecko/20020502 CS 2000 7.0/7.0 -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b; MultiZilla v1.5.0.2g) Gecko/20030827 -Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030504 Mozilla Firebird/0.5+StumbleUpon/1.63 -Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.2) Gecko/20021126 -Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2a) Gecko/20020910 -Mozilla/5.0 (X11; U; Linux 2.4.3-20mdk i586; en-US; rv:0.9.1) Gecko/20010611 -#Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Google Wireless Transcoder;) -Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; Media Center PC 5.0; .NET CLR 1.1.4322; Windows-Media-Player/10.00.00.3990; InfoPath.2 -Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; Dealio Deskball 3.0) -Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; NeosBrowser; .NET CLR 1.1.4322; .NET CLR 2.0.50727) -Mozilla/4.0 (compatible; MSIE 5.5; Windows 98) -Mozilla/4.0 (compatible; MSIE 5.22; Mac_PowerPC) -Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt) -Mozilla/4.0 (compatible; MSIE 4.01; Windows NT 5.0) -Mozilla/1.22 (compatible; MSIE 2.0; Windows 95) -Mozilla/3.0 (compatible; NetPositive/2.2.2; BeOS) -Mozilla/3.0 (compatible; NetPositive/2.2.1; BeOS) -Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.8pre) Gecko/20071019 Firefox/2.0.0.8 Navigator/9.0.0.1 -Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20050519 Netscape/8.0.1 -Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) -Mozilla/5.0 (Windows; U; WinNT4.0; en-CA; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 -Mozilla/4.8 [en] (X11; U; Linux 2.4.20-8 i686) -Mozilla/3.01 (WinNT; I) [AXP] -Mozilla/2.02 [fr] (WinNT; I) -Mozilla/0.91 Beta (Windows) -Mozilla/0.6 Beta (Windows) -Mozilla/4.7 (compatible; OffByOne; Windows 2000) Webster Pro V3.4 -NetSurf/0.0 (RISC OS; armv5l)NetSurf/0.0 (Linux; i686) -Netsurf -Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/125.4 (KHTML, like Gecko, Safari) OmniWeb/v563.34 -Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/85 (KHTML, like Gecko) OmniWeb/v558.48 -Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/85 (KHTML, like Gecko) OmniWeb/v558.46 -Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/85 (KHTML, like Gecko) OmniWeb/v496 -Mozilla/4.5 (compatible; OmniWeb/4.2.1-v435.9; Mac_PowerPC) -Mozilla/4.5 (compatible; OmniWeb/4.2-v435.2; Mac_PowerPC) -OmniWeb/2.7-beta-3 OWF/1.0 -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20061019 pango-text -Opera/9.20 (Macintosh; Intel Mac OS X; U; en) -Opera/9.02 (Windows NT 5.0; U; en) -Opera/9.00 (Windows NT 4.0; U; en) -Opera/9.00 (X11; Linux i686; U; en) -Opera/9.0 (Windows NT 5.1; U; en)Opera/9.0 (Macintosh; PPC Mac OS X; U; en)Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 9.0 -Opera/8.5 (Macintosh; PPC Mac OS X; U; en)Mozilla/5.0 (Macintosh; PPC Mac OS X; U; en) Opera 8.5Mozilla/4.0 (compatible; MSIE 6.0; Mac_PowerPC Mac OS X; en) Opera 8.5 -Opera/8.0 (Macintosh; PPC Mac OS X; U; en)Mozilla/5.0 (Macintosh; PPC Mac OS X; U; en) Opera 8.0Mozilla/4.0 (compatible; MSIE 6.0; Mac_PowerPC Mac OS X; en) Opera 8.0 -Opera/8.01 (Windows NT 5.1)Mozilla/5.0 (Windows NT 5.1; U; en) Opera 8.01Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) -Mozilla/5.0 (Windows NT 5.1; U; en) Opera 8.00Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 8.00 -Opera/8.00 (Windows NT 5.1; U; en) -Mozilla/5.0 (X11; Linux i386; U) Opera 7.60 [en-GB] -Opera/7.60 (Windows NT 5.2; U) [en] (IBM EVV/3.0/EAK01AG9/LE) -Opera/7.54 (Windows NT 5.1; U) [pl] -Opera/7.50 (X11; Linux i686; U) [en] -Mozilla/5.0 (X11; Linux i686; U) Opera 7.50 [en] -Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686) Opera 7.20 [en] -Opera/7.11 (Windows NT 5.1; U) [en] -Mozilla/4.0 (compatible; MSIE 6.0; Windows ME) Opera 7.11 [en] -Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.0) Opera 7.02 Bork-edition [en] -Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 4.0) Opera 7.0 [en] -Mozilla/4.0 (compatible; MSIE 5.0; Windows 95) Opera 6.01 [en] -Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC) Opera 5.0 [en] -Mozilla/4.01 (Compatible; Acorn Browse 1.25 [23-Oct-97] AW 97; RISC OS 4.39) Acorn-HTTP/0.84 -Mozilla/1.10 [en] (Compatible; RISC OS 3.70; Oregano 1.10) -Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.6) Gecko/20011128 -Mozilla/3.0 (compatible; HP Web PrintSmart 04b0 1.0.1.34) -Bison/0.02 [fu] (Win67; X; SK) -retawq/0.1.6 [en] (text) -Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/522.11.1 (KHTML, like Gecko) Version/3.0.3 Safari/522.12.1 -Mozilla/5.0 (Windows; U; Windows NT 5.1; bg) AppleWebKit/522.13.1 (KHTML, like Gecko) Version/3.0.2 Safari/522.13.1 -Mozilla/4.0 (compatible; Mozilla/4.0; Mozilla/5.0; Mozilla/6.0; Safari/431.7; Macintosh; U; PPC Mac OS X 10.6 Leopard; AppleWebKit/421.9 (KHTML, like Gecko) ) -Mozilla/5.0 (Windows; U; Windows NT 5.1; ru) AppleWebKit/522.11.3(KHTML, like Gecko) Version/3.0 Safari/522.11.3 -Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/419.3 (KHTML, like Gecko) Safari/419.3 -Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/418.8 (KHTML, like Gecko) Safari/419.3 -Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/417.9 (KHTML, like Gecko) Safari/417.8 -Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/417.3 (KHTML, like Gecko) Safari/417.2 -Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/412 (KHTML, like Gecko) Safari/412 -Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr-fr) AppleWebKit/312.5.1 (KHTML, like Gecko) Safari/312.3.1 -Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr-fr) AppleWebKit/312.5 (KHTML, like Gecko) Safari/312.3 -Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/124 (KHTML, like Gecko) Safari/125.1 -Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/106.2 (KHTML, like Gecko) Safari/100.1 -Mozilla/5.0 (Macintosh; U; PPC Mac OS X; es) AppleWebKit/85 (KHTML, like Gecko) Safari/85 -Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/74 (KHTML, like Gecko) Safari/74 -Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/51 (like Gecko) Safari/51 -Mozilla/5.0 (X11; U; OpenVMS AlphaServer_ES40; en-US; rv:1.4) Gecko/20030826 SWB/V1.4 (HP) -Mozilla/2.0 (Compatible; SIS 1.2; IIgs) -Mozilla/5.0 (Windows; U; Windows NT 5.0; en-NZ; rv:1.8.1b2) Gecko/20060925 Songbird/0.2 -Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20060206 Songbird/0.1 -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20061024 Firefox/2.0 (Swiftfox) -Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 Sylera/1.2.7 -W3CLineMode/5.4.0 libwww/5.4.0 -Mozilla/3.0 (compatible; WebCapture 2.0; Auto; Windows) -w3m/0.5.1 -w3m/0.4.1 -Wget/1.8.1 -Wget/1.6 -Xenu_Link_Sleuth_1.2d -Science Traveller International 1X/1.0 -Mozilla/3.0 (compatible) -amaya/9.51 libwww/5.4.0 -amaya/9.1 libwww/5.4.0 -amaya/6.2 libwww/5.3.1 -AmigaVoyager/3.4.4 (MorphOS/PPC native) -xChaos_Arachne/5.1.89;GPL,386+ -Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; FDM) -Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Avant Browser [avantbrowser.com]; Hotbar 4.4.5.0) -Amiga-AWeb/3.5.07 beta -Mozilla/6.0; (Spoofed by Amiga-AWeb/3.5.07 beta) -MSIE/6.0; (Spoofed by Amiga-AWeb/3.4APL) -bluefish 0.6 HTML editor -Mozilla/4.61 [en] (X11; U; ) - BrowseX (2.0.0 Windows) -Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en; rv:1.8.1.6) Gecko/20070809 Camino/1.5.1 -Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.1) Gecko/20060118 Camino/1.0b2+ -Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5b) Gecko/20030917 Camino/0.7+ -Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.1) Gecko/20021104 Chimera/0.6 -Mozilla/4.08 (Charon; Inferno) -Mozilla/2.0 compatible; Check&Get 1.14 (Windows NT) -Chimera/2.0alpha -Contiki/1.0 (Commodore 64; http://dunkels.com/adam/contiki/) -curl/7.7.2 (powerpc-apple-darwin6.0) libcurl 7.7.2 (OpenSSL 0.9.6b) -Democracy/0.8.1 (http://www.participatoryculture.org) -Dillo/0.8.5-i18n-misc -Dillo/0.8.5-pre -Dillo/0.8.3 -Dillo/0.8.2 -Dillo/0.6.6 -DocZilla/1.0 (Windows; U; WinNT4.0; en-US; rv:1.0.0) Gecko/20020804 -edbrowse/2.2.10 -ELinks/0.10.4-7ubuntu1-debian (textmode; Linux 2.6.12-10-k7-smp i686; 80x24-2) -ELinks/0.10.5 (textmode; CYGWIN_NT-5.0 1.5.18(0.132/4/2) i686; 143x51-2) -ELinks (0.4.2; Linux; ) -Emacs-W3/4.0pre.46 URL/p4.0pre.46 (i686-pc-linux; X11) -Mozilla/5.0 (X11; U; Linux x86_64; en; rv:1.8.1.4) Gecko/20061201 Epiphany/2.18 Firefox/2.0.0.4 (Ubuntu-feisty) -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060731 Epiphany/2.14 Firefox/1.5.0.5 -Mozilla/5.0 (X11; U; Linux i686; en; rv:1.8.1) Gecko/20061203 Epiphany/2.16 Firefox/2.0 -Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.1) Gecko/Debian-1.8.0.1-5 Epiphany/1.8.5 -Mozilla/5.0 (X11; U; Linux i686; cs-CZ; rv:1.7.13) Gecko/20060418 Epiphany/1.8.2 (Ubuntu) (Ubuntu package 1.0.8) -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040924 Epiphany/1.4.4 (Ubuntu) -Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040628 Epiphany/1.2.6 -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031030 Epiphany/1.0.8 -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 Epiphany/1.0.4 -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030704 Epiphany/0.9.2 -Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 Epiphany/0.8.4 -fetch libfetch/2.0 -Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a9pre) Gecko/2007100205 Minefield/3.0a9pre -Mozilla/5.0 (X11; U; Darwin Power Macintosh; en-US; rv:1.8.0.12) Gecko/20070803 Firefox/1.5.0.12 Fink Community Edition -Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.13) Gecko/20060410 Firefox/1.0.8 -Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20041002 Firefox/0.10.1 -Mozilla/5.0 (X11; U; SunOS sun4m; en-US; rv:1.4b) Gecko/20030517 Mozilla Firebird/0.6 -Mozilla/4.0 (compatible; MSIE 6.0; ; Linux armv5tejl; U) Opera 8.02 [en_US] Maemo browser 0.4.31 N770/SU-18 -Mozilla/5.0 (X11; U; Linux armv6l; en-US; rv:1.9a6pre) Gecko/20070807 Firefox/3.0a1 Tablet browser 0.1.16 RX-34_2007SE_4.2007.26-8 - diff --git a/django/contrib/minidetector/useragents.py b/django/contrib/minidetector/useragents.py deleted file mode 100644 index 9a9adb00..00000000 --- a/django/contrib/minidetector/useragents.py +++ /dev/null @@ -1,13 +0,0 @@ -import os.path - -def load_from_search_strings_file(): - f = None - try: - f = open(os.path.join(os.path.dirname(__file__), 'search_strings.txt')) - ss = f.readlines() - finally: - if f: - f.close() - return [s.strip() for s in ss if not s.startswith('#')] - -search_strings = load_from_search_strings_file() \ No newline at end of file diff --git a/django/src/routemap/apps/map/views.py b/django/src/routemap/apps/map/views.py index 0d989dc0..cc167ac5 100644 --- a/django/src/routemap/apps/map/views.py +++ b/django/src/routemap/apps/map/views.py @@ -23,14 +23,12 @@ from django.views.generic.simple import direct_to_template from django.conf import settings -from minidetector import detect_mobile from django.utils.importlib import import_module table_module, table_class = settings.ROUTEMAP_ROUTE_TABLE.rsplit('.',1) table_module = import_module(table_module) -@detect_mobile def route_map_view(request, relid=None, name=None, template='basemap.html'): if request.COOKIES.has_key('_routemap_location'): cookie = request.COOKIES['_routemap_location'].split('|') @@ -85,9 +83,7 @@ def route_map_view(request, relid=None, name=None, template='basemap.html'): context['show_elevation_profile'] = settings.SHOW_ELEV_PROFILE - if request.mobile: - template = 'm_%s' % template - context['ismobile'] = request.mobile + context['ismobile'] = request.flavour == 'mobile' return direct_to_template(request, template=template, extra_context=context diff --git a/django/src/routemap/manage.py b/django/src/routemap/manage.py index cf04ef0c..fd4b64e3 100755 --- a/django/src/routemap/manage.py +++ b/django/src/routemap/manage.py @@ -16,7 +16,6 @@ def set_schema(sender, connection, **kwargs): from django.core.management import execute_from_command_line sys.path.append(os.path.normpath(os.path.join(os.path.realpath(__file__), '../..'))) - sys.path.append(os.path.normpath(os.path.join(os.path.realpath(__file__), '../../../contrib'))) sys.path.append(os.path.normpath(os.path.join(os.path.realpath(__file__), '../../../../config'))) if len(sys.argv) > 1 and sys.argv[-1] in ('hiking', 'cycling', 'skating', 'mtbmap'): diff --git a/django/src/routemap/sites/wsgi.py b/django/src/routemap/sites/wsgi.py index 5d071d49..9dea9cc6 100644 --- a/django/src/routemap/sites/wsgi.py +++ b/django/src/routemap/sites/wsgi.py @@ -44,7 +44,6 @@ def set_schema(sender, connection, **kwargs): basepath = os.path.normpath(os.path.join(os.path.realpath(__file__), '../../../../..')) sys.path.append(os.path.join(basepath, 'django/src')) -sys.path.append(os.path.join(basepath, 'django/contrib')) sys.path.append(os.path.join(basepath, 'config')) from django.db.backends.signals import connection_created diff --git a/django/templates/basemap.html b/django/templates/full/basemap.html similarity index 100% rename from django/templates/basemap.html rename to django/templates/full/basemap.html diff --git a/django/templates/m_basemap.html b/django/templates/mobile/basemap.html similarity index 100% rename from django/templates/m_basemap.html rename to django/templates/mobile/basemap.html