2
내 모델은 내가 모든 줄을 얻으려면이.filter - 장고
class Foo(models.Model):
user = models.ForeignKey(User)
class Meta:
abstract = True
class Bar(Foo):
bar_thing = models.CharField(..)
class Baz(Foo):
baz_thing = models.CharField(..)
처럼, 바즈 (그리고 다른 FooSubclasses)
user__username = '안녕하세요'이있는 나는 do Foo.objects.filter(user__username = 'hello')
. 이 오류가 발생합니다 'Options' object has no attribute '_join_cache'
어떻게하면됩니까?
이 페이지의 일부 정보는 도움이 될 수 있습니다. http://stackoverflow.com/questions/7884359/foreignkey-to-abstract-class-generic-relations –