You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Foo(models.Model):
bar = models.ForeignKey(Bar)
ql_fields = ('bar',)
class Bar(models.Model):
name = models.CharField()
a_stuff = models.CharField()
b_stuff = models.CharField()
class BarA(Bar):
ql_fields = ('a_stuff',)
class Meta:
proxy = True
class BarB(Bar):
ql_fields = ('b_stuff',)
class Meta:
proxy = True
When specifying the lookup fields for Foo.bar (all of which are on the base model), how can I handle distinct field lookups on each proxy?
Would it be possible to specify in Foo as ql_fields = ('bara', 'barb') and for DjangoQL to find the proxies? Or would it make more sense to create a set of all the ql_fields of all proxy models?
The text was updated successfully, but these errors were encountered:
sorry, I'm not sure what you mean. ql_fields is not a part of DjangoQL API, you should specify lookup fields using Schema classes and not Django model classes, please refer to examples in the docs
Say I have proxy models BarA and BarB like:
When specifying the lookup fields for
Foo.bar
(all of which are on the base model), how can I handle distinct field lookups on each proxy?Would it be possible to specify in
Foo
asql_fields = ('bara', 'barb')
and for DjangoQL to find the proxies? Or would it make more sense to create a set of all theql_fields
of all proxy models?The text was updated successfully, but these errors were encountered: