We can't do that inside a @transaction.atomic block. It's also not
necessary, because paypal_error is only called before any database
modifications are made, and returns out of the view directly.
# Custom error return that can get to the request context
def paypal_error(reason):
- # Explicitly roll back the transaction, since our
- # error page will look like a success to django...
- transaction.rollback()
return render_to_response('paypal/error.html', {
'reason': reason,
}, context_instance=RequestContext(request))