-
Notifications
You must be signed in to change notification settings - Fork 768
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
Basic Proxy model support #373
Basic Proxy model support #373
Conversation
2 similar comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, I just commented two things about code style.
Since I'm not familiar with proxy models, maybe it would be worth having a review from @mjtamlyn and @spockNinja if they have some time :)
EDIT: if you rebase from master the failing on the CI should disappear :)
graphene_django/tests/models.py
Outdated
'Reporter Type', | ||
null=True, | ||
blank=True, | ||
choices=[(1, u'Regular'), (2, u'CNN Reporter')]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can you add a line break before the closing )
? just to be consistent with the rest of the changes
graphene_django/tests/models.py
Outdated
proxy model support | ||
""" | ||
class Meta: | ||
proxy=True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can you add a space before and after the =
?
added support for querying a model with objects that may be a proxy model, fixed and added tests a few style changes
f70f12d
to
0b10341
Compare
@patrick91 rebased and made the style changes (hopefully I understood the first one) |
@jm2242 I mean a line break, like this: ...
choices=[(1, u'Regular'), (2, u'CNN Reporter')]
) |
that was silly, fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
The changes for proxy model support look great.
There is a separate PR dealing with Django 2.0 test support (#336), so if you would slim this PR down to just the proxy model changes and tests, that would be great, and we'll move this PR forward.
Thanks again!
no problem @spockNinja, done! |
To be honest I know next to nothing about proxy models so probably can't help much here :) |
The PR looks good, merging :) |
Is graphene-django looking to release a new version and release this to pypi, the last build released was in october. I would like to have access to this fix so that i no longer have to use chain and lists for some of my queries that need proxy support |
This PR, in reference to #319 :
is_type_of()
for the object would fail.- addson_delete
where it was breaking tests due to Django 2 requirementreporter_type
In the future, a more intentional way of dealing with Proxy models can be considered.
There are 4 failing tests that are unrelated to this PR