Re: Admin interface not preventing simultaneous editing of the same record

2009-08-13 Thread Will Hardy
A quick note on your approach: What if the user isn't supposed to have access to certain fields in a customised form? You probably want to take a checksum as Russell suggested earlier and put that in the hidden field. Of course, dealing with conflicts will be harder if you can't show the user whi

Re: Admin interface not preventing simultaneous editing of the same record

2009-08-13 Thread David
On Aug 12, 12:20 am, Alex Gaynor wrote: > Personally I think including > a JSON dump of the model with the page is the easiest solution, but I > could be convinced otherwise. I have something that works now: http://pastebin.com/f1bd4c7a3 There's a big comment in the clean() method that expla

Re: Admin interface not preventing simultaneous editing of the same record

2009-08-12 Thread David
On Aug 12, 12:20 am, Alex Gaynor wrote: > Personally I think including > a JSON dump of the model with the page is the easiest solution, but I > could be convinced otherwise. I have made a little bit of progress: I already had a subclass of forms.ModelForm. I added a form field, overrode over

Re: Admin interface not preventing simultaneous editing of the same record

2009-08-12 Thread Doug Blank
On Aug 12, 12:17 am, David wrote: > On Aug 12, 12:06 am, Russell Keith-Magee > wrote: > > > Another cause for hesitation is that it would be an admin-specific > > solution to the problem. A generic solution that would work for all > > ModelForms would be nice if it is possible. > > Agreed. I sha

Re: Admin interface not preventing simultaneous editing of the same record

2009-08-11 Thread Alex Gaynor
On Tue, Aug 11, 2009 at 11:06 PM, Russell Keith-Magee wrote: > > On Wed, Aug 12, 2009 at 10:55 AM, David wrote: >> >> >> >> On Aug 11, 10:29 pm, Russell Keith-Magee >> wrote: >> >>> There are any number of ways to solve this problem by adding a field >>> to the model (autofield with an 'edit numb

Re: Admin interface not preventing simultaneous editing of the same record

2009-08-11 Thread David
On Aug 12, 12:06 am, Russell Keith-Magee wrote: > Another cause for hesitation is that it would be an admin-specific > solution to the problem. A generic solution that would work for all > ModelForms would be nice if it is possible. Agreed. I shall look at that first since it's more generally

Re: Admin interface not preventing simultaneous editing of the same record

2009-08-11 Thread Russell Keith-Magee
On Wed, Aug 12, 2009 at 10:55 AM, David wrote: > > > > On Aug 11, 10:29 pm, Russell Keith-Magee > wrote: > >> There are any number of ways to solve this problem by adding a field >> to the model (autofield with an 'edit number', timestamp tracking last >> edit time etc). However, these aren't rea

Re: Admin interface not preventing simultaneous editing of the same record

2009-08-11 Thread David
On Aug 11, 10:29 pm, Russell Keith-Magee wrote: > There are any number of ways to solve this problem by adding a field > to the model (autofield with an 'edit number', timestamp tracking last > edit time etc). However, these aren't really candidates for a general > solution. It didn't occur to

Re: Admin interface not preventing simultaneous editing of the same record

2009-08-11 Thread Russell Keith-Magee
On Wed, Aug 12, 2009 at 9:24 AM, David wrote: > > After being unable to get any advice or further information via > google, #django or the users' mailing list, I opened > http://code.djangoproject.com/ticket/11652 regarding the admin > interface not preventing simultaneous

Admin interface not preventing simultaneous editing of the same record

2009-08-11 Thread David
After being unable to get any advice or further information via google, #django or the users' mailing list, I opened http://code.djangoproject.com/ticket/11652 regarding the admin interface not preventing simultaneous editing of the same record (or at least not providing that as an optio