在pre_save 中 没有created,这个参数
可以通过下边的方法判断是否是新建created
instance._state.adding is True
或者
if instance._state.adding:
经测试,在更新update是,这个值是false
在pre_save 中 没有created,这个参数
可以通过下边的方法判断是否是新建created
instance._state.adding is True
或者
if instance._state.adding:
经测试,在更新update是,这个值是false