内置的信号量
 

model:import  django.db.models.signals 
          pre_init = ModelSignal(providing_args=["instance", "args", "kwargs"], use_caching=True)
          post_init = ModelSignal(providing_args=["instance"], use_caching=True)
          pre_save = ModelSignal(providing_args=["instance", "raw", "using", "update_fields"],
                       use_caching=True)
          post_save = ModelSignal(providing_args=["instance", "raw", "created", "using", "update_fields"], use_caching=True)
          pre_delete = ModelSignal(providing_args=["instance", "using"], use_caching=True)
         post_delete = ModelSignal(providing_args=["instance", "using"], use_caching=True)
         m2m_changed = ModelSignal(
                    providing_args=["action", "instance", "reverse", "model", "pk_set", "using"],
                   use_caching=True,
         )
       pre_migrate = Signal(providing_args=["app_config", "verbosity", "interactive", "using", "apps", "plan"])
      post_migrate = Signal(providing_args=["app_config", "verbosity", "interactive", "using", "apps", "plan"])

查看全文


FIZLIN
514 声望8 粉丝

跟我走吧,天亮就出发


« 上一篇
python MRO
下一篇 »
Django -commands