Django Book 翻译
菜单>:
TOC
返回
原文:
When adding a field to a table/model in a production setting, the trick is to take advantage of the fact that Django doesnt care if a table contains columns that arent defined in the model. The strategy is to add the column in the database, and then update the Django model to include the new field.
翻译:
当按照产品需求向一个表/模型添加字段时,Django不关心一个表的列是否在模型中定义,我们可以利用这个小技巧,先在数据库中添加列,然后再改变模型中对应的字段。
备注:
译者: