2010/2/5 Jared Smith <jaredtsm...@gmail.com>

> My use case is that I'll have multiple users trying to update a set of
> objects and I want to make sure that any user committing a change has
> knowledge of the existing state.  I was going to model that with a version
> number so an update would look like:
>

Maybe I'm missing something, but this sounds like the canonical use of
ETags.  Provide an Etag with the read, then when the update comes in check
if the ETag matches what is calculated for the current state of the DB.

If it does, let the update through.  If not, then force the user to retry
based on the new state.

Cheers,

Malcolm

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to