P
P
PiggyPig2017-07-27 13:13:41
Django
PiggyPig, 2017-07-27 13:13:41

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='Родительские категории')

How to make an independent selection of several categories?

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