V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
border
V2EX  ›  Project Babel

在最新版本的2.5.0-dev-7中怎么添加节点?

  •  
  •   border · 2012-08-11 14:55:00 +08:00 · 4595 次点击
    这是一个创建于 4521 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我从github上下载最新的版本SYSTEM_VERSION = '2.5.0-dev-7', 看了半天还是没有找到添加节点的地方。
    3 条回复    1970-01-01 08:00:00 +08:00
    mimzy
        1
    mimzy  
       2012-08-11 16:37:07 +08:00
    后台 - 区域 - 添加新节点
    border
        2
    border  
    OP
       2012-08-11 18:19:36 +08:00
    谢谢,你的回复,但是我添加了一个,一直报错。
    Traceback (most recent call last):
    File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\webapp\_webapp25.py", line 701, in __call__
    handler.get(*groups)
    File "D:\work\gae\python\v2ex\main.py", line 910, in get
    output = template.render(path, template_values)
    File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\webapp\template.py", line 92, in render
    return t.render(Context(template_dict))
    File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\webapp\template.py", line 128, in wrap_render
    return orig_render(context)
    File "C:\Program Files (x86)\Google\google_appengine\lib\django_0_96\django\template\__init__.py", line 168, in render
    return self.nodelist.render(context)
    File "C:\Program Files (x86)\Google\google_appengine\lib\django_0_96\django\template\__init__.py", line 705, in render
    bits.append(self.render_node(node, context))
    File "C:\Program Files (x86)\Google\google_appengine\lib\django_0_96\django\template\__init__.py", line 718, in render_node
    return(node.render(context))
    File "C:\Program Files (x86)\Google\google_appengine\lib\django_0_96\django\template\defaulttags.py", line 209, in render
    return self.nodelist_true.render(context)
    File "C:\Program Files (x86)\Google\google_appengine\lib\django_0_96\django\template\__init__.py", line 705, in render
    bits.append(self.render_node(node, context))
    File "C:\Program Files (x86)\Google\google_appengine\lib\django_0_96\django\template\__init__.py", line 718, in render_node
    return(node.render(context))
    File "C:\Program Files (x86)\Google\google_appengine\lib\django_0_96\django\template\defaulttags.py", line 210, in render
    return self.nodelist_false.render(context)
    File "C:\Program Files (x86)\Google\google_appengine\lib\django_0_96\django\template\__init__.py", line 705, in render
    bits.append(self.render_node(node, context))
    File "C:\Program Files (x86)\Google\google_appengine\lib\django_0_96\django\template\__init__.py", line 718, in render_node
    return(node.render(context))
    File "C:\Program Files (x86)\Google\google_appengine\lib\django_0_96\django\template\__init__.py", line 767, in render
    output = self.filter_expression.resolve(context)
    File "C:\Program Files (x86)\Google\google_appengine\lib\django_0_96\django\template\__init__.py", line 563, in resolve
    obj = resolve_variable(self.var, context)
    File "C:\Program Files (x86)\Google\google_appengine\lib\django_0_96\django\template\__init__.py", line 650, in resolve_variable
    current = getattr(current, bits[0])
    File "D:\work\gae\python\v2ex\v2ex\babel\__init__.py", line 74, in created_ts
    return self.created.strftime("%s")
    ValueError: Invalid format string
    border
        3
    border  
    OP
       2012-08-11 18:39:18 +08:00   ❤️ 1
    搞定了,把return self.created.strftime("%s")里面的%s, 改成%S
    http://www.tutorialspoint.com/python/time_strftime.htm
    %S - second
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2807 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 06:51 · PVG 14:51 · LAX 22:51 · JFK 01:51
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.