Why groups are not populated upon `auth_permission`?

Upon Django I made this migration:


# Generated by Django 5.2.17 on 2026-09-19 15:23

from django.db import migrations


class Migration(migrations.Migration):

    dependencies = [
        ('blog', '0001_initial'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='article',
            options={'permissions': [('create_article', 'Permission for a User to create an Article'), ('update_article', 'Permission for a user to edit an article')]},
        ),
    ]

But upon auth_persmission the permission create_article and update_article are not populated:

id content_type_id codename name
1 1 add_logentry Can add log entry
2 1 change_logentry Can change log entry
3 1 delete_logentry Can delete log entry
4 1 view_logentry Can view log entry
5 2 add_permission Can add permission
6 2 change_permission Can change permission
7 2 delete_permission Can delete permission
8 2 view_permission Can view permission
9 3 add_group Can add group
10 3 change_group Can change group
11 3 delete_group Can delete group
12 3 view_group Can view group
13 4 add_contenttype Can add content type
14 4 change_contenttype Can change content type
15 4 delete_contenttype Can delete content type
16 4 view_contenttype Can view content type
17 5 add_session Can add session
18 5 change_session Can change session
19 5 delete_session Can delete session
20 5 view_session Can view session
21 6 add_category Can add category
22 6 change_category Can change category
23 6 delete_category Can delete category
24 6 view_category Can view category
25 7 add_article Can add article
26 7 change_article Can change article
27 7 delete_article Can delete article
28 7 view_article Can view article
29 8 add_user Can add user
30 8 change_user Can change user
31 8 delete_user Can delete user
32 8 view_user Can view user

Why though??? As far as I understand upon auth_permission the permissions are stored then once I do upon models.py:

class Article(models.Model):
    id=models.AutoField(primary_key=True)
    title=models.CharField(max_length=255)
    content=models.TextField()
    slug=models.SlugField()
    author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
    category = models.ManyToManyField(Category)

    class Meta:
        permissions = [
            ("create_article","Permission for a User to create an Article"),
            ("update_article","Permission for a user to edit an article")
        ]

But the:

python manage.py makemigrations
python manage.py migrate

Does not create the persmission upon db. Do you know why???

Вернуться на верх