Creating migrations for model translations

Open the shell and run the following command to create a new migration for the model translations:

python manage.py makemigrations shop --name "translations"

You will see the following output:

Migrations for 'shop':  shop/migrations/0002_translations.py    - Create model CategoryTranslation    - Create model ProductTranslation    - Change Meta options on category    - Change Meta options on product    - Remove field name from category    - Remove field slug from category    - Alter index_together for product (0 constraint(s))    - Add field master to producttranslation    - Add field master to categorytranslation    - Remove field description from product    - Remove field name from product    - Remove field slug from product - Alter ...

Get Django 2 by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.