Django Book 翻译
菜单>:
TOC
返回
原文:
Its often a good idea to add active flags to your data models. You can look up only active objects, and simply set the active field to ``False`` instead of deleting the object. Then, if you realize youve made a mistake, you can simply flip the flag back.
翻译:
通常更好的方法是给你的数据模型添加激活标志。你可以只在激活的对象中查找, 对于不需要的对象,将激活字段值设为 ``False`` , 而不是删除对象。这样, 如果一旦你认为做错了的话,只需把标志重设回来就可以了。
备注:
译者: