On May 30, 10:38 am, David Zhou <[EMAIL PROTECTED]> wrote:
> You can use also use hasattr().
>
> Something like
>
> if hasattr(person_obj, 'man'):
>     #is man
> elif hassattr(person_obj, 'woman'):
>     #is woman
> else:
>     #is freakish mutated thing
>

How would that work exactly? It's a reverse relation, so you need to
specify what exactly you want (e.g. the data from the Man or Woman
table). It can't automatically go out and get it.

http://www.djangoproject.com/documentation/model-api/#inheritance-and-reverse-relations



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to