【发布时间】:2020-11-25 20:50:51
【问题描述】:
我对 Django 环境很陌生,这是我面临的一个问题:
首先我做了一个模型:
class ABC(Model):
field A
field B
field C
然后,我使用以下命令成功迁移了它们:
python manage.py makemigrations
python manage.py migrate
然后,我再次在同一模型中添加了一个新字段:
class ABC(Model):
#rest fields are here
field D
这些也已成功迁移。
但是,现在问题来了。
迁移后,我无法在 Django 管理界面中看到字段 D。 (我要为其编辑值)
我在这里有什么遗漏吗?
(PS:已经试过sqlflush、dbshell各种可能的故障排除)
我还重新启动了 NGINX 和 Gunicorn(因为我托管在 AWS EC2 上)
我确定,正在创建字段。
请帮忙。
【问题讨论】:
标签: django django-models amazon-ec2 django-admin