1
yueyoum 2014-09-24 18:44:38 +08:00 1
应该用 transaction.atomic
https://docs.djangoproject.com/en/dev/topics/db/transactions/ commit_on_success 是旧API,在django1.8以后会移除 并且, commit_on_success 从文档来看 只能用作装饰器 但atomic 除了装饰器,还可以用于 with 语法 with transaction.atomic(): ....xxx |
3
ziming2018 2015-09-16 11:16:38 +08:00
@Melodic 不遥远,早就出来了
|