I am currently developing a google app engine app using the django non-rel web framework. I have a method which transfers money from one account to the other, it is very simple. When I run it on my local server using a debugger, it works just fine and transfers all the money correctly. However, when I run it remotely on app engine, I end up with strange negative values. The crux of the method is:
pubAccount.secondary_money = pubAccount.secondary_money + transaction.money
pubAccount.money = pubAccount.money - transaction.money
After extensive research I found that this could be due to the fact I am not using transactions meaning the transfer is in no way atomic, thus race conditions can occur. But django non-rel does not support transactions properly, and the parts it does support is not directly supported by app engine, and from what I've found, anything supported by python-app engine toolkit, is not supported by django non-rel.
so can anyone tell me how I can get transactions working on app engine with django non-rel!? Someone must have got it working out there!