zoukankan      html  css  js  c++  java
  • web.py 模板错误记录

    错误信息

    Traceback (most recent call last):
      File "/root/anaconda2/envs/py27/lib/python2.7/site-packages/web/application.py", line 239, in process
        return self.handle()
      File "/root/anaconda2/envs/py27/lib/python2.7/site-packages/web/application.py", line 230, in handle
        return self._delegate(fn, self.fvars, args)
      File "/root/anaconda2/envs/py27/lib/python2.7/site-packages/web/application.py", line 462, in _delegate
        return handle_class(cls)
      File "/root/anaconda2/envs/py27/lib/python2.7/site-packages/web/application.py", line 438, in handle_class
        return tocall(*args)
      File "/root/web_py/autoImg/user.py", line 38, in GET
        return render.user(temp['province'], temp['openid'], temp['headimgurl'], temp['city'], temp['country'], temp['nickname'])
      File "/root/anaconda2/envs/py27/lib/python2.7/site-packages/web/template.py", line 1017, in __getattr__
        t = self._template(name)
      File "/root/anaconda2/envs/py27/lib/python2.7/site-packages/web/template.py", line 1014, in _template
        return self._load_template(name)
      File "/root/anaconda2/envs/py27/lib/python2.7/site-packages/web/template.py", line 1001, in _load_template
        raise AttributeError, "No template named " + name
    AttributeError: No template named user

    解决方法

    将user.html重命名为.user.html

     参考

    web.py使用模板时报错No template named index原因及解决方案

  • 相关阅读:
    bzoj3224
    [洛谷日报第62期]Splay简易教程 (转载)
    bzoj1588
    codeforces467C
    codeforces616B
    codeforces379C
    codeforces545C
    codeforces285C
    codeforces659C
    快读代码level.2
  • 原文地址:https://www.cnblogs.com/lurenjia1994/p/9640251.html
Copyright © 2011-2022 走看看