小编cgw*_*wid的帖子

Django 1.7:Makemigration:不可为空的字段

我正在尝试在我的项目中使用 django-orderedmodel ( https://github.com/kirelagin/django-orderedmodel )。

运行 makemigrations 不起作用:

 You are trying to add a non-nullable field 'order' to slide without a default; we can't do that (the database needs something to populate existing rows).
Please select a fix:
 1) Provide a one-off default now (will be set on all existing rows)
 2) Quit, and let me add a default in models.py
Select an option: 
Run Code Online (Sandbox Code Playgroud)

我想知道我在哪里做错了。谢谢

python database django field non-nullable

4
推荐指数
1
解决办法
8394
查看次数

标签 统计

database ×1

django ×1

field ×1

non-nullable ×1

python ×1