V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  border  ›  全部回复第 1 页 / 共 1 页
回复总数  2
2012-08-11 18:39:18 +08:00
回复了 border 创建的主题 Project Babel 在最新版本的2.5.0-dev-7中怎么添加节点?
搞定了,把return self.created.strftime("%s")里面的%s, 改成%S
http://www.tutorialspoint.com/python/time_strftime.htm
%S - second
2012-08-11 18:19:36 +08:00
回复了 border 创建的主题 Project Babel 在最新版本的2.5.0-dev-7中怎么添加节点?
谢谢,你的回复,但是我添加了一个,一直报错。
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
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1073 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 10ms · UTC 19:33 · PVG 03:33 · LAX 11:33 · JFK 14:33
Developed with CodeLauncher
♥ Do have faith in what you're doing.