django-tables2
django-tables2 copied to clipboard
ModelTable: Resolving database query strings should work with instance._meta
Currently, if a table column refers to a reverse accessor of a OneToOne relation, it is required that each row actually has a related instance. A missing related instance would raise an exception instead of assuming a NULL value.
Rather than just reversing through the object attributes, django-tables should look at instance._meta at which database fields have actually been defined. If it determines that a reverse OneToOne accessor exists, but no corresponding attribute does, it would then just assume a null value rather than raising an exception.
See the issue described here in more detail: http://stackoverflow.com/questions/4877160/django-tables-and-following-a-one-to-one-relationship-backwards-through-a-related