Commits

Alessandro Molina committed 703dc24

update keywords for cogbin and make is_mobile explicitly a boolean to avoid unexpected usage of the value by applications

Comments (0)

Files changed (2)

         "Topic :: Software Development :: Libraries :: Python Modules",
         "Framework :: TurboGears"
         ],
-      keywords='turbogears pylons TG2',
+      keywords='turbogears2.extension pylons',
       author='Alessandro Molina',
       author_email='alessandro.molina@axant.it',
       url='http://bitbucket.org/_amol_/tgext.mobilemiddleware',

tgext/mobilemiddleware/middleware.py

             
     def __call__(self, environ, start_response):
         request = Request(environ)
-        request.is_mobile = self.detect_mobile(request)
+        request.is_mobile = bool(self.detect_mobile(request))
         response = request.get_response(self.application)
         return response(environ, start_response)