Thursday, September 30, 2010

contrib-admin in a multiuser environment is a bit scary

I've been having bad dreams about the ways in which contrib-admin can
eat your data when you have more than one administrator.

As a worst-case scenario imagine a model with some list_editable
fields:

Admin1 has the changelist open for a considerable length of time
Admin2 makes a load of changes
Admin1 makes one change and wipes all of Admin2's changes (at least
for the number of items specified in ModelAdmin.list_per_page which is
100 by default)

How do other people handle these issues? This must have bitten someone
severely by now?

There isn't much in Trac about this. I found:
http://code.djangoproject.com/ticket/11652
http://code.djangoproject.com/ticket/11313

At the very least there should be giant warnings in letters of flame
in the admin docs.

Has anyone looked into:

a) Optimistic locking for changelist and change forms
b) modifying list_editable to only save the instances that have
changed

or anything similar?

Andy

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment