First time here? Check out the FAQ!
2

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

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?

DaveJ61's avatar
31
DaveJ61
asked 2020-02-25 21:05:51 -0500
Wingware Support's avatar
4k
Wingware Support
updated 2020-02-25 21:16:11 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

1

+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"....

Chris Curvey's avatar
216
Chris Curvey
answered 2020-05-05 15:31:54 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

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.

Wingware Support's avatar
4k
Wingware Support
answered 2020-02-26 11:01:29 -0500
edit flag offensive 0 remove flag delete link

Comments

Hi, Is this also true of:-

response.status_code

and

.DoesNotExist

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

Dave

DaveJ61's avatar DaveJ61 (2020-02-26 21:40:27 -0500) 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's avatar Wingware Support (2020-02-27 10:24:26 -0500) edit
add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer