2017年9月18日
摘要: 信号:在需要的地方通知receiver某些操作已发生。如调用model的save方法时会发送pre_save(在调用save之前)和post_save,pre_save可以连接一个receiver函数,在函数中做需要的处理。 django信号文档 两种方式接收信号 1.使用connect 2.使用装 阅读全文
posted @ 2017-09-18 18:24 songbird 阅读(187) 评论(0) 推荐(0) 编辑