#27894: ATOMIC_REQUESTS setting isn't honored in second view called via 
as_view()
--------------------------------+--------------------------------------
     Reporter:  Patrick Gerken  |                    Owner:  nobody
         Type:  Bug             |                   Status:  closed
    Component:  Uncategorized   |                  Version:  1.10
     Severity:  Normal          |               Resolution:  invalid
     Keywords:                  |             Triage Stage:  Unreviewed
    Has patch:  0               |      Needs documentation:  0
  Needs tests:  0               |  Patch needs improvement:  0
Easy pickings:  0               |                    UI/UX:  0
--------------------------------+--------------------------------------
Changes (by Aymeric Augustin):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 That's an interesting question, but I'm not convinced ATOMIC_REQUESTS
 should apply to that case.

 As the word REQUESTS in ATOMIC_REQUESTS implies, the atomicity is tied to
 an incoming HTTP request, and there's no HTTP request going through
 Django's HTTP / WSGI stack when the second view is called.

 A view is just a Python function. Django isn't going to interfere when you
 call that function. You should wrap the call to the second view in an
 atomic block yourself when you call it to achive the desired effect.

--
Ticket URL: <https://code.djangoproject.com/ticket/27894#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.6a9e3a5dab69aad67ba76b81bb3cb37f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to