Saturday, February 13, 2016

Migrations in Django 1.9: verbose_name and verbose_name_plural

Hello, 
I've upgraded a project to Django 1.9.

I've:
LANGUAGE_CODE = 'it'
LANGUAGES = (('it', 'Italian'),)

With Django 1.8 after running makemigrations I got the no changes detected message.

On 1.9 makemigrations creates migrations for all of my apps and all third party apps.

I had a look at the new migration files and I've a lot of AlterModelOptions and AlterField.
The relevant changes are on verbose_name and verbose_name_plural:
With 1.8 I had untranslated strings (English), with 1.9 I've the translated strings in Italian.

    (...)
    
    operations = [
        migrations.AlterModelOptions(
            name='category',
            options={'verbose_name': 'categoria', 'verbose_name_plural': 'categorie'},
        ),
        migrations.AlterField(
            model_name='category',
            name='description',
            field=models.TextField(verbose_name='descrizione'),
        ),

    (...)
    
    ]

How can I avoid this behaviour?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d4ae5a29-8df1-4f00-bc05-fe9a6b6e514c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment