﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26756	Changing of model's verbose_name does not change the names of the model's permissions	Dmitry Burakov		"I've found that changing the ""verbose_name"" of the Meta class of a model and than running migrations does not change the names of the model's permissions.

Steps to reproduce:

1. Create a new model

{{{
class AwesomeModel(models.Model):
    class Meta:
        verbose_name = ""My awesome model""
}}}


2. Run ""makemigrations"" and than ""migrate""
3. Look at the generated permissions


{{{
select * from auth_permission;
 id  |                  name                  | content_type_id |             codename
-----+----------------------------------------+-----------------+----------------------------------
   1 | Can add my awesome model               |               2 | add_awesomemodel
   2 | Can change my awesome model            |               2 | change_awesomemodel
   3 | Can delete my awesome model            |               2 | delete_awesomemodel
}}}


4. Change the ""verbose_name"" of the Meta class of the model


{{{
class AwesomeModel(models.Model):
    class Meta:
        verbose_name = ""My really awesome model""
}}}


5. Run ""makemigrations"" and than ""migrate"" again
6. Look at the generated permissions agaun

{{{

select * from auth_permission;
 id  |                  name                  | content_type_id |             codename
-----+----------------------------------------+-----------------+----------------------------------
   1 | Can add my awesome model               |               2 | add_awesomemodel
   2 | Can change my awesome model            |               2 | change_awesomemodel
   3 | Can delete my awesome model            |               2 | delete_awesomemodel
}}}


As you can see the names of the model's permissions are not changed.
But! If now you drop the database and apply all the migrations to the empty database - the permissions will have correct names


{{{
select * from auth_permission;
 id  |                  name                  | content_type_id |             codename
-----+----------------------------------------+-----------------+----------------------------------
   1 | Can add my really awesome model        |               2 | add_awesomemodel
   2 | Can change my really awesome model     |               2 | change_awesomemodel
   3 | Can delete my really awesome model     |               2 | delete_awesomemodel
}}}

"	Bug	new	contrib.auth	dev	Normal		permissions verbose_name migrate		Accepted	1	0	0	1	0	0
