Monday, December 2, 2019

Why is the Django server running even when pytlinter shows that there's some bug in the code?

I was just following this tutorial, on how to make Django apps and how to display a database to the user. I created a simple database in models.py and then, I defined a function in views.py, which used Item.objects.all(). Now Pylinter says that 'Item' has no 'objects' member!

So this should prevent the server from running ( as its a bug after all!), but if I type in python manage.py runserver, the terminal shows no error and the server starts functioning. 

Please see the photo attachment to get a clearer view of the problem!

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6428642e-3d7d-4d95-b387-0894c8410897%40googlegroups.com.

No comments:

Post a Comment