推荐学习书目
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 · Feb 4, 2013 · 4367 views
    This topic created in 4847 days ago, the information mentioned may be changed or developed.
    大家都知道django中的ORM事务是自动的。
    如果我现在有一个类,里面有两个方法,分别是A,B
    @transaction.commit_manually
    def A:
    B()

    def B:
    B这个方法中也有对Model的操作,我的疑问是:
    B这个方法中是隐式的新开了一个事务,还是与A方法处在同一个事务中?
    如果默认是隐式开了一个新事务,请问我有什么办法可以将它放入A的事务中?
    1 replies    1970-01-01 08:00:00 +08:00
    angelo_peng
        1
    angelo_peng  
    OP
       Feb 5, 2013
    有人知道吗?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   931 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 21:21 · PVG 05:21 · LAX 14:21 · JFK 17:21
    ♥ Do have faith in what you're doing.