Django ForeignKey _set on an inherited model
Posted
by
neolaser
on Stack Overflow
See other posts from Stack Overflow
or by neolaser
Published on 2011-01-31T22:32:22Z
Indexed on
2011/01/31
23:25 UTC
Read the original article
Hit count: 186
I have two models Category
and Entry
. There is another model ExtEntry
that inherits from Entry
class Category(models.Model):
title = models.CharField('title', max_length=255)
description = models.TextField('description', blank=True)
...
class Entry(models.Model):
title = models.CharField('title', max_length=255)
categories = models.ManyToManyField(Category)
...
class ExtEntry(Entry):
groups= models.CharField('title', max_length=255)
value= models.CharField('title', max_length=255)
...
I am able to use the Category.entry_set
but I want to be able to do Category.blogentry_set
but it is not available. If this is not available,then I need another method to get all ExtEntry
related to one particular Category
Thanks
© Stack Overflow or respective owner