adding reverse collection for children

This commit is contained in:
2013-07-24 21:45:19 +10:00
parent 798ab9cbbe
commit f00cfdf8e2

View File

@@ -14,7 +14,8 @@ class CommonInfo(models.Model):
class Category(CommonInfo):
parent = models.ForeignKey('self', blank=True, null=True,
on_delete=models.SET_NULL)
on_delete=models.SET_NULL,
related_name='children')
class Sample(CommonInfo):