小编jam*_*jar的帖子

删除陈旧的ContentTypes的最干净方法?

我想摆脱运行迁移时收到的以下消息:

The following content types are stale and need to be deleted:

    appname | modelname

Any objects related to these content types by a foreign key will also
be deleted. Are you sure you want to delete these content types?
Run Code Online (Sandbox Code Playgroud)

在迁移中对删除或不删除的决定进行编码似乎更干净。

在迁移过程中检测和删除过时的ContentType的最干净方法是什么?如果自动创建 ContentType,为什么不自动完成?

django django-models django-migrations

1
推荐指数
2
解决办法
932
查看次数

标签 统计

django ×1

django-migrations ×1

django-models ×1