python - 南 : how to ignore a changed model while creating a migration for an app

标签 python django django-south

我在一个应用程序中有两个已更改的模型,但我只想为一个模型创建迁移,而忽略另一个模型,这是否可以使用 的变体来实现

./manage.py schemamigration app --auto 

命令?

最佳答案

创建迁移的方法有很多种。但我只会定义两种方式。

 //migrate the changes of all models of the app
 ./manage.py schemamigration app --auto

 //migrate only the changes of the given model or 1 model
 python manage.py schemamigration app_name extend_modelname --auto

关于python - 南 : how to ignore a changed model while creating a migration for an app,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15216215/

相关文章:

python - 生成大小为 n 的二进制数作为元组 : itertools. Product(*[(0, 1)] * n)

python - 自毁构造函数 == 单例?

python - 为什么 PyCharm 在此处使用 @property 时会发出警告?

python - 为什么有时候 Django 的开发服务器会挂掉?

django - 如何设置主键,然后转换为自动字段?

python - 获取两个具有缺失值的 DataFrame 的平均值

python - Apache 在我的 django 应用程序中使用 mod_wsgi 显示 404 错误

django - Angular JS 和 Django

python - Django 南 : access model's __unicode__() method

django - 在 Django 中扩展 South Introspection