【发布时间】:2012-05-24 00:23:38
【问题描述】:
我正在从 webapp1 迁移到 webapp2 以及从 python 2.5 迁移到 python2.7 我有一些我使用的自定义标签
webapp.template.register_template_library('common.templatetags')
并注册于:
from google.appengine.ext.webapp import template
register = template.create_template_register()
和相应的装饰器和其他一切都很好
现在我需要使用没有 template.register 的 webapp2.....
我试过这样做:http://www.john-smith.me/Tag/webapp2 但它没有工作
谢谢
【问题讨论】:
-
通过使用 django add_to_builtins() 而不是使用不可调试的 {%load%} 标签修复了,这太浪费时间了:D
-
你知道你可以回答你自己的问题吗?
-
是的,但仅在 6 小时后,现在我需要等待 5 小时才能接受我自己的答案:D