Browse Source

mobile_index.htm

add iphone viewport(fit iphone width)

view.py
  add some mobile user agent
Natenom/support-murmur-13-1446181288462
withgod 15 years ago
parent
commit
e7bc200927
  1. 13
      pyweb/mumble/views.py
  2. 3
      template/mobile_index.htm

13
pyweb/mumble/views.py

@ -41,6 +41,19 @@ def redir( request ):
"Windows CE" in request.META['HTTP_USER_AGENT'] or \ "Windows CE" in request.META['HTTP_USER_AGENT'] or \
"MIDP" in request.META['HTTP_USER_AGENT'] or \ "MIDP" in request.META['HTTP_USER_AGENT'] or \
"Palm" in request.META['HTTP_USER_AGENT'] or \ "Palm" in request.META['HTTP_USER_AGENT'] or \
"NetFront" in request.META['HTTP_USER_AGENT'] or \
"Nokia" in request.META['HTTP_USER_AGENT'] or \
"Symbian" in request.META['HTTP_USER_AGENT'] or \
"UP.Browser" in request.META['HTTP_USER_AGENT'] or \
"UP.Link" in request.META['HTTP_USER_AGENT'] or \
"WinWAP" in request.META['HTTP_USER_AGENT'] or \
"Android" in request.META['HTTP_USER_AGENT'] or \
"DoCoMo" in request.META['HTTP_USER_AGENT'] or \
"KDDI-" in request.META['HTTP_USER_AGENT'] or \
"Softbank" in request.META['HTTP_USER_AGENT'] or \
"J-Phone" in request.META['HTTP_USER_AGENT'] or \
"IEMobile" in request.META['HTTP_USER_AGENT'] or \
"iPod" in request.META['HTTP_USER_AGENT'] or \
"iPhone" in request.META['HTTP_USER_AGENT']: "iPhone" in request.META['HTTP_USER_AGENT']:
return HttpResponseRedirect( reverse( mobile_mumbles ) ); return HttpResponseRedirect( reverse( mobile_mumbles ) );
else: else:

3
template/mobile_index.htm

@ -3,6 +3,9 @@
<title>Mumble Administration</title> <title>Mumble Administration</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<!-- for iphone/ipod -->
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0">
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}/style.css" /> <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}/style.css" />
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}/templatestyle.css" /> <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}/templatestyle.css" />
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}/mumble/style.css" /> <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}/mumble/style.css" />

Loading…
Cancel
Save