跳转至内容
  • 版块
  • 标签
  • 热门
  • 用户
  • 群组
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(Flatly)
  • 不使用皮肤
折叠

Odoo 中文社区

  1. 主页
  2. 版块
  3. Odoo 新手求助
  4. 请教openerp web controllers的参数问题

请教openerp web controllers的参数问题

已定时 已固定 已锁定 已移动 Odoo 新手求助
3 帖子 2 发布者 3.8k 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • B 离线
    B 离线
    baialaps
    写于 最后由 编辑
    #1

    openerp 的web中,有代码如下:

    <br />class Home(openerpweb.Controller):<br />&nbsp; &nbsp; _cp_path = &#039;/&#039;<br /><br />&nbsp; &nbsp; @openerpweb.httprequest<br />&nbsp; &nbsp; def index(self, req, s_action=None, db=None, **kw):<br />&nbsp; &nbsp; &nbsp; &nbsp; db, redir = db_monodb_redirect(req)<br />&nbsp; &nbsp; &nbsp; &nbsp; if redir:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return redirect_with_hash(req, redir)<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; js = &quot;\n&nbsp; &nbsp; &nbsp; &nbsp; &quot;.join(&#039;&lt;script type=&quot;text/javascript&quot; src=&quot;%s&quot;&gt;&lt;/script&gt;&#039; % i for i in manifest_list(req, &#039;js&#039;, db=db))<br />&nbsp; &nbsp; &nbsp; &nbsp; css = &quot;\n&nbsp; &nbsp; &nbsp; &nbsp; &quot;.join(&#039;&lt;link rel=&quot;stylesheet&quot; href=&quot;%s&quot;&gt;&#039; % i for i in manifest_list(req, &#039;css&#039;, db=db))<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; r = html_template % {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;js&#039;: js,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;css&#039;: css,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;modules&#039;: simplejson.dumps(module_boot(req, db=db)),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;init&#039;: &#039;var wc = new s.web.WebClient();wc.appendTo($(document.body));&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; return r<br /><br />&nbsp; &nbsp; @openerpweb.httprequest<br />&nbsp; &nbsp; def login(self, req, db, login, key):<br />&nbsp; &nbsp; &nbsp; &nbsp; return login_and_redirect(req, db, login, key)<br /><br />
    


    请问要如何得到req中的数据?
    get和post中有什么区别?要如何获取?
    我使用mac没有能成功安装调试工具,麻烦有安装的童鞋帮一下忙,谢谢

    1 条回复 最后回复
    0
    • K 离线
      K 离线
      klm2242
      写于 最后由 编辑
      #2

      不知是否為您所要~~以下網址可以參考~

      GET & POST區別
      http://www.wibibi.com/info.php?tid=235

      1 条回复 最后回复
      0

      • 登录

      • 没有帐号? 注册

      • 登录或注册以进行搜索。
      • 第一个帖子
        最后一个帖子
      0
      • 版块
      • 标签
      • 热门
      • 用户
      • 群组