By default, when creating migrations, Django will compare all the attributes
of all models and all fields and compare them to the latest migrated state.
This means that changes to attributes like verbose_name
, choices
,
help_text
, and validators
cause new migrations to be created - even
though they have no effect on the underlying database.
This is the way Django was designed to behave, but if during development you
have constant changes to those attributes, and would like to prevent them from
generating migrations, use this snippet. Place it anywhere that gets imported
when your project runs (particularly on the command makemigrations
).
You may add/remove fields from the list, based on your specific need.