I'm kind of new to both Django and Python, so bear with me if the answer here is really obvious.
I'm working on a blog/CMS project wherein I want to have different types of posts--for example, normal articles, film reviews, book reviews, etc.--where each type of post will have certain common fields and will also have fields unique to that type. I want to have the common fields (e.g. author, creation date, etc) in one db table while keeping the unique fields in a separate table for each type of post. This is pretty easy to accomplish with Django's multi-table inheritance. I can just create a base model that has attributes for the common fields and then sub-class models for each new kind of post. I've done this and I think it's pretty slick. The tricky thing, now, is that I have several models that inherit the base class. Now, say I have entered a bunch of posts into my various tables, and when I do this, I am clearly going to be saving instances of my sub-classes, not my base class. My question is: if, when I go to query the db, I create an instance of the base class, how can I tell what sub-class I originally saved the information as? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---