> The problem is I can't figure out
how to detect that extra data without adding some indication in the
Items table as to what other table(s) to check in. Or I could check all
specialized tables, which is clunky.

There may be some way to find out using introspection. You have the
_meta.fields list available for doing so - you could possibly look at
all non-null OneToOne fields and display the extra data in your model:
    def get_all_fkey_reps(self):
        from django.core.meta import fields
        foreignkeys = [f for f in self._meta.fields if str(f.__class__)
== str(fields.ForeignKey)]
        for key in foreignkeys:
            if getattr(self, key.attname):
                print repr(getattr(self, 'get_%s' % (key.name))())

This was just for debugging though - in your case you probably just
want to return the first non-null object.

 -rob

Reply via email to