Browse Source

recognize more (most, I hope) mobile browsers

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
0488e08485
  1. 7
      pyweb/mumble/views.py

7
pyweb/mumble/views.py

@ -35,7 +35,12 @@ from mmobjects import *
def redir( request ):
""" Redirect to the servers list. """
if request.META['HTTP_USER_AGENT'].startswith( 'BlackBerry' ):
if request.META['HTTP_USER_AGENT'].startswith( 'BlackBerry' ) or \
"Opera Mini" in request.META['HTTP_USER_AGENT'] or \
"Windows CE" in request.META['HTTP_USER_AGENT'] or \
"MIDP" in request.META['HTTP_USER_AGENT'] or \
"Palm" in request.META['HTTP_USER_AGENT'] or \
"iPhone" in request.META['HTTP_USER_AGENT']:
return HttpResponseRedirect( reverse( mobile_mumbles ) );
else:
return HttpResponseRedirect( reverse( mumbles ) );

Loading…
Cancel
Save