-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Class 'BlogArticles' has no 'objects' member #4
Comments
检查一下前面有没有地方拼写做了
2018-06-22 18:29 GMT+08:00 Torvalz <[email protected]>:
… 文件 ./blog/views.py里,blog_title()函数中 blogs = BlogArticles.objects.all(),提示Class
'BlogArticles' has no 'objects' member",请教下这个怎么解决下?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#4>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/ADel63vNOYs930g3ehTrlzJE7U8PonCPks5t_MbsgaJpZM4UzjYr>
.
--
*QiWei*
|
pylint在面对django框架时表现的有些不足,因为django使用了大量的元编程(metaprograming)思想以及鸭子模型,以至于在程序运行时会修改不少对象的属性和行为,但是这样给pylint这样的语法检测程序带来了比较大的困难。典型的就是集成了django.db.models.Model的模型层对象在编译时没有objects属性,但是运行时却有,造成我们在编写代码时pylint会报"has no objects attributes"之类的错误,虽然不影响程序运行。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
文件 ./blog/views.py里,blog_title()函数中 blogs = BlogArticles.objects.all(),提示Class 'BlogArticles' has no 'objects' member",请教下这个怎么解决下?
The text was updated successfully, but these errors were encountered: