Ask Your Question
2

objects.all() - Attribute undefined: .objects of ******: ******

asked 2020-02-25 21:05:51 -0600

DaveJ61 gravatar image

updated 2020-02-25 21:16:11 -0600

Why does Wing complain about objects.all() in my views? It runs perfectly otherwise. I'm not sure why anyone else has not posed the question either, as far as I can tell. Is there something I'm missing?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2020-02-26 11:01:29 -0600

This is due to how Django classes are implemented. The warnings can be disabled by clicking on the red X beside the warning in the warning list or in the tooltip displayed for the warning.

We plan to improve this in future releases.

edit flag offensive delete link more

Comments

Hi, Is this also true of:-

response.status_code

and

.DoesNotExist

which also displays the same attribute undefined warning...?

Dave

DaveJ61 gravatar imageDaveJ61 ( 2020-02-26 21:40:27 -0600 )edit

It's probably also true in these cases. In general, if the attributes are valid when you run or debug the warnings are spurious and should be disabled.

Wingware Support gravatar imageWingware Support ( 2020-02-27 10:24:26 -0600 )edit
1

answered 2020-05-05 15:31:54 -0600

Chris Curvey gravatar image

+1 if we could find a way to hint Wing that "any instance of subclass of django.models.Model contains the following methods: objects, DoesNotExist, MultipleObjectsReturned"....

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-02-25 21:04:03 -0600

Seen: 131 times

Last updated: May 05