Thanks, Andy. I'll give that a try!
Corey
On Jul 18, 2006, at 9:35 PM, Andrew wrote:
>
> Here's how I did it for a similar situation I had.
>
> class MyCategory(models.Model):
> category = models.CharField(maxlength=50)
> parent_category = models.ForeignKey('self', blank=True,
>
Here's how I did it for a similar situation I had.
class MyCategory(models.Model):
category = models.CharField(maxlength=50)
parent_category = models.ForeignKey('self', blank=True,
null=True, related_name='sub_categories')
def all_items(self):
data = list(self.ite
I have three tables: pubs, routes, and addresses, there is a
hierarchical relation ship between them:
one pub has many routes which in turn has many addresses.
Simplified models:
class Publication(models.Model):
code = models.CharField(blank=True, maxlength=10, unique=True)
name = model
3 matches
Mail list logo