[FIX] standalone client
bzr revid: al@openerp.com-20120812215517-qxqnd1fvc9hcxezh
This commit is contained in:
parent
aa93e7186d
commit
1d0c2968ce
|
@ -1,11 +1,19 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
from openerp.addons.web.common import http as oeweb
|
|
||||||
import werkzeug
|
import werkzeug
|
||||||
|
|
||||||
class Mobile(oeweb.Controller):
|
try:
|
||||||
|
# embedded
|
||||||
|
import openerp.addons.web.common.http as openerpweb
|
||||||
|
from openerp.addons.web.controllers.main import View
|
||||||
|
except ImportError:
|
||||||
|
# standalone
|
||||||
|
import web.common.http as openerpweb
|
||||||
|
from web.controllers.main import View
|
||||||
|
|
||||||
|
class Mobile(openerpweb.Controller):
|
||||||
_cp_path = '/mobile'
|
_cp_path = '/mobile'
|
||||||
|
|
||||||
@oeweb.httprequest
|
@openerpweb.httprequest
|
||||||
def index(self, req):
|
def index(self, req):
|
||||||
return werkzeug.utils.redirect('/web_mobile/static/src/web_mobile.html', 301)
|
return werkzeug.utils.redirect('/web_mobile/static/src/web_mobile.html', 301)
|
||||||
|
|
Loading…
Reference in New Issue