django 更新model

修改models.py 中对应的class

在admin.py 中 增加 admin.site.register(WafDevice)

进入dbshell

python manage.py dbshell

 

看一下数据表:

.table

.dump resource_hostdevice

 

手动修改对应的数据表:

alter table resource_wafdevice  add column 'mark_number' varchar(100) not null default 'nsfocus';

posted @ 2015-03-03 19:00  阿毛小猪  阅读(355)  评论(0编辑  收藏  举报