If these things are problems for your application, you need 
transactions, period.  Anything else you cobble together without 
transactions will merely be a buggy implementation of half of a real 
transaction system.  You'll keep encountering problems until you finally 
embrace existing transaction technology.

It is too bad that Django doesn't support transactions.  If you need 
them, then you need them badly, and you should find a framework that 
supports them to build your application.  Many web applications don't 
require them, and Django is great for them.  I'm hoping Django will 
support them soon, because it will broaden the class of applications it 
can be used for.

--Ned.

hsitz wrote:
> ZebZiggle --
>
> Sorry, if you're not talking about any sort of auto-refresh at all, and
> are just talking about fact that in Django the second user's object
> will automatically overwrite the object that the first user just saved
> in the db, without any warning or error message, then I agree this is a
> problem.
>
> I'm a newbie, Is that really the way Django works?  If so, I agree that
> in the typical  business app (i.e., not just cms-type apps) there
> should be some way to return this warning to the user.
>
> That is, there should be some way to simulate optimistic locking in the
> db.  Easiest way I can think of would be to add a timestamp to each
> record and to make sure they match when doing updates or deletes, and
> to return error message warning user that object has changed if there
> is no match.  Of course, I expect it'd be a little more difficult than
> that.. .
>
> -- Herb
>
>
>
>
>
>
>   

-- 
Ned Batchelder, http://nedbatchelder.com

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to