V
V
vixh2011-04-20 00:48:38
Django
vixh, 2011-04-20 00:48:38

Initializing an existing model with django-mptt service data

I want to do it: I added the missing fields manually, how now to generate data for them based on parent?
Category(models.Model):
name = models.CharField(u'Название', max_length=255, unique=True)
parent = models.ForeignKey('self', verbose_name=u'Родительская категория', null=True, blank=True, related_name='children')


Category(MPTTModel):
...


Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question