Rex,
My appologies. Though the feature is in 1.0 I gave a link to the 1.1
documentation.
Django 1.0 docs: http://docs.djangoproject.com/en/1.0/topics/db/models/#id7
2009/6/3 Ian Lewis
> Rex,
>
> Django parent model instances will also have a property equal to the
>
Rex,
Django parent model instances will also have a property equal to the
lowercase name of the subclass. So for Animal instances that happen to be a
Duck you can do something like "my_room.animal.duck" to get the Duck
instance. Depending on what you are doing you might want to try that. It's
On Jun 1, 5:39 am, Rex wrote:
> Hello,
>
> I have a question that is best illustrated by the following fictional
> example. (I put my question at the end.)
>
> #=
> # In models.py
> class Room(models.Model):
> animal = models.ForeignKey(Animal)
>
> class
Hello,
I have a question that is best illustrated by the following fictional
example. (I put my question at the end.)
#=
# In models.py
class Room(models.Model):
animal = models.ForeignKey(Animal)
class Animal(models.Model):
#[...]
class Duck(Animal):
#[...]
# In views.py
4 matches
Mail list logo