Answer the question
In order to leave comments, you need to log in
Why is the ManyToManyField automatically populated with existing categories?
It seems that he did not indicate anything unusual, and when creating an article, existing categories are automatically put in the category field.
class Category(models.Model):
# ...
class Page(models.Model):
# ...
parents = models.ManyToManyField(Category, verbose_name='Родительские категории')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question