V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
angelo_peng
V2EX  ›  Python

请教大家一个Django事务的问题。

  •  
  •   angelo_peng · 2013-02-04 19:17:14 +08:00 · 3455 次点击
    这是一个创建于 4091 天前的主题,其中的信息可能已经有所发展或是发生改变。
    大家都知道django中的ORM事务是自动的。
    如果我现在有一个类,里面有两个方法,分别是A,B
    @transaction.commit_manually
    def A:
    B()

    def B:
    B这个方法中也有对Model的操作,我的疑问是:
    B这个方法中是隐式的新开了一个事务,还是与A方法处在同一个事务中?
    如果默认是隐式开了一个新事务,请问我有什么办法可以将它放入A的事务中?
    1 条回复    1970-01-01 08:00:00 +08:00
    angelo_peng
        1
    angelo_peng  
    OP
       2013-02-05 12:46:46 +08:00
    有人知道吗?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5204 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 07:06 · PVG 15:06 · LAX 00:06 · JFK 03:06
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.