您的位置:首页 > 其它

'my_calendar' is not a valid tag library

2011-08-20 11:04 721 查看
错误信息:'my_calendar' is not a valid tag library: Template library my_calendar not found, tried django.templatetags.my_calendar,django.contrib.admin.templatetags.my_calendar,address.templatetags.my_calendar

而在“\my_calendar\templatetags\”下面明明有my_calendar.py存在。

原来:

“\my_calendar\templatetags\”下缺少__init__.py,所以Python不会把它当做一个模块。

所以,

添加__init__.py就可以了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐