gregmuellegger / django-mobile

Detect mobile browsers and serve different template flavours to them.
http://pypi.python.org/pypi/django-mobile
BSD 3-Clause "New" or "Revised" License
560 stars 170 forks source link

No option to provide empty exceptions #49

Closed Gandi24 closed 9 years ago

Gandi24 commented 10 years ago

There is not possibility to provide empty list of exceptions search.

The default one is: user_agents_exception_search = u"(?:%s)" % u'|'.join(( 'ipad', ))

Providing: user_agents_exception_search = u"(?:%s)" % u'|'.join(( )) crushes the detection.

gregmuellegger commented 9 years ago

Hi, as a work around you can set:

user_agents_exception_search = "(?!)"

That sets the search term to a regular expression that will never match anything.