Форум сайта python.su
День добрый.
К примеру есть
class Country(models.Model): country_name = models.CharField('Country', max_length = 30)
Отредактировано TitanFighter (Сен. 15, 2015 16:22:27)
Офлайн
В документации есть примеры https://docs.djangoproject.com/en/1.8/ref/migration-operations/#special-operations
Офлайн
Офлайн
FishHook, как я понял, вы про Automatically loading initial data fixtures?
Deprecated since version 1.7:Как я понял, лавочку с автозагрузкой фикстур прикрывают. Нужно использовать Data Migration. В любом случае спасибо, что направили на нужную часть документации.
If an application uses migrations, there is no automatic loading of fixtures. Since migrations will be required for applications in Django 1.9, this behavior is considered deprecated. If you want to load initial data for an app, consider doing it in a data migration.
Отредактировано TitanFighter (Сен. 15, 2015 16:21:14)
Офлайн