[FIX] remove "/mobile" hardcoded redirect

bzr revid: chs@openerp.com-20120808114818-l5tpvlkxm2ylx5ym
This commit is contained in:
Christophe Simonis 2012-08-08 13:48:18 +02:00
parent 32dd6ddc38
commit 9db8f8ac64
3 changed files with 12 additions and 4 deletions

View File

@ -494,10 +494,6 @@ class Root(object):
request.parameter_storage_class = werkzeug.datastructures.ImmutableDict
request.app = self
if request.path == '/mobile': # FIXME move to web_mobile module
return werkzeug.utils.redirect(
'/web_mobile/static/src/web_mobile.html', 301)(environ, start_response)
handler = self.find_handler(*(request.path.split('/')[1:]))
if not handler:

View File

@ -0,0 +1 @@
import controllers

View File

@ -0,0 +1,11 @@
#!/usr/bin/env python
from openerp.addons.web.common import http as oeweb
import werkzeug
class Mobile(oeweb.Controller):
_cp_path = '/mobile'
@oeweb.httprequest
def index(self, req):
return werkzeug.utils.redirect('/web_mobile/static/src/web_mobile.html', 301)