i don't think it's the case that the remainder of the view will not be
encapsulated in a transaction.  is that documented somewhere?  my read is
that the normal behavior of transaction middleware will remain in effect
for the remainder of the request - any subsequent writes will be committed
at the end of request processing as long as no exception is raised.


On Mon, Mar 17, 2014 at 1:32 PM, Greg Price <notifications@github.com>wrote:

> In common/djangoapps/student/views.py:
>
> > @@ -1150,11 +1151,15 @@ def create_account(request, post_override=None):
> >              return JsonResponse(js, status=400)
> >
> >      # Ok, looks like everything is legit.  Create the account.
> > -    ret = _do_create_account(post_vars)
> > +    with transaction.commit_on_success():
>
> I don't think we should use commit_on_success, because it means that any
> database updates for the remainder of the view will not be encapsulated in
> a transaction, which is a difficult thing to document and remember.
> Instead, I think we should do manual transaction management (with the
> transaction.commit_manually decorator).
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/edx/edx-platform/pull/2957/files#r10667885>
> .
>