I have found a solution. Could someone tell me, if this is OK or if this is a bad solution?
> > finally: > > if result['status'] == 'OK': transaction.set_clean() > > otherfile.test() > > reserv.delete() > > transaction.commit() > > else: > > transaction.rollback() > > return render_to_response('template.html', {'result':result}) On Feb 18, 4:48 pm, Brot <[EMAIL PROTECTED]> wrote: > Hello, > > The view works well if I delete the call 'otherfile.test()' > There is also no error if I delete the dictionary declaration in > 'otherfile.test()'. My example code is only an extraction from my > code. In my real 'test-function' is a lot of code (I use urlib, urlib2 > and htmllib there). > But the error only appears if I declare a dictonary in the function. > This makes no sense for me :-( > > On 18 Feb., 16:21, Thomas Guettler <[EMAIL PROTECTED]> wrote: > > > Hi, > > > You get this because thetransactionis 'dirty' (some statement was > > executed, > > but there was no commit/rollback afterwards). I guess this happens > > in render_to_response in your example. > > > > K' > > > finally: > > > if result['status'] == 'OK': > > > otherfile.test() > > > reserv.delete() > > > transaction.commit() > > > else: > > > transaction.rollback() > > > > return render_to_response('template.html', {'result':result}) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---