-
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
Support for Proxy Models #319
Comments
Following that traceback, I think the root of the problem is here. We are checking for So I think to support proxy models, we might want to check |
I went back through django source to 1.7, and it looks like |
excellent! that was it, thanks for your help. I'll get a PR up with a test or two and some docs |
@jm2242 Did you get this PR up? If so could you link it here so i could follow it since my issue should also be fixed by this PR. |
I have not, but I will do this today or tomorrow! |
Did this get fixed? Is there a temporary solution to it? |
Yes I believe this PR does address this, at least basic support #373 |
@jm2242 thanks for getting back. I just noticed that it was failing for me because I was trying to use it in model relationship and at the model level I was defining the relationship through the proxy model. So if someone finds this, just make sure you don't use proxy models in the |
Maybe post a minimal example, and someone can pick it up and fix it? |
A bit late but the example would be: class Model1(models.Model):
....
class ProxyModel1(Model1):
....
class Meta:
proxy = True
class Model2(models.Model):
relationship = models.ForeignKey(ProxyModel1)
.... |
The test case currently has an Currently at:
To match the example given here they foreign key would be adjusted to |
Let's take this over to #603, thanks all. |
Is there support for querying proxy models? I'm trying to query a model that has a bunch of proxy models but am getting an error. Here's an abbreviated look at my setup:
and
my query is:
Here's the trace:
I know this PR https://github.com/graphql-python/graphene-django/pull/156/files is waiting to be merged, but I tried running my query with the proposed changes and still get the same error.
The text was updated successfully, but these errors were encountered: