django:无法导入名称 SimpleListFilter
I have the code form django docs, but this will output an error.
ImportError: cannot import name SimpleListFilter
I am using django 1.3
Anyone knows what's problem with this import?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相信 SimpleListFilter 是在 Django 1.4 中添加的。如果您查看 Django 1.3 Admin 的文档,则不会提及它的。
I believe that SimpleListFilter was added in Django 1.4. If you look at the documentation for Django 1.3 Admin no mention is made of it.
您正在查看开发文档。如果您跳到页面顶部并单击 1.3,您将看到该模型在您的版本中不可用。
You're looking at the dev docs. If you jump to the top of the page and click on 1.3, you'll see that model isn't available in your version.