|
|
|
@ -22,7 +22,8 @@ class Category(models.Model): |
|
|
|
description = models.TextField( |
|
|
|
description = models.TextField( |
|
|
|
'Описание', default='', null=True, blank=True) |
|
|
|
'Описание', default='', null=True, blank=True) |
|
|
|
parent = models.ForeignKey( |
|
|
|
parent = models.ForeignKey( |
|
|
|
'self', default=None, null=True, blank=True, related_name='childs') |
|
|
|
'self', default=None, null=True, blank=True, related_name='childs', |
|
|
|
|
|
|
|
verbose_name='Родительская категория') |
|
|
|
attributes = models.ManyToManyField( |
|
|
|
attributes = models.ManyToManyField( |
|
|
|
'Attribute', through='AttributeForCategory') |
|
|
|
'Attribute', through='AttributeForCategory') |
|
|
|
|
|
|
|
|
|
|
|
|