Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Inline formset exception
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
poswald  
View profile  
 More options Mar 7 2011, 8:29 am
From: poswald <paulosw...@gmail.com>
Date: Mon, 7 Mar 2011 05:29:06 -0800 (PST)
Local: Mon, Mar 7 2011 8:29 am
Subject: Inline formset exception
It seems that I have managed to get a reproducible process for an
issue that has flummoxed a few other people over the past few months:
http://code.djangoproject.com/ticket/14642

In a nutshell, inline formset code (which I have relatively little
understanding of so far) is not protected from simultaneous edits of
related items. It's insidious because it probably won't happen if you
are the only user on the system testing your app in development. It's
only when you get to production and many people are working on the
same data. I can also confirm that this happens on the latest Django
1.3 rc1

I'm trying to go through the code now to find a way to patch it but my
main reason for coming to the developers list is this: What is Django
supposed to do in this case? As a user I can think of two possible
user expected behaviors: one would be that my changes overwrite the
previous submission. The second is that I am informed that my form was
invalid and hopefully the developers have given me a new form and
somehow preserved my submitted data. What is the correct behavior?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ramiro Morales  
View profile  
 More options Mar 7 2011, 9:06 am
From: Ramiro Morales <cra...@gmail.com>
Date: Mon, 7 Mar 2011 11:06:38 -0300
Local: Mon, Mar 7 2011 9:06 am
Subject: Re: Inline formset exception

On Mon, Mar 7, 2011 at 10:29 AM, poswald <paulosw...@gmail.com> wrote:
> It seems that I have managed to get a reproducible process for an
> issue that has flummoxed a few other people over the past few months:
> http://code.djangoproject.com/ticket/14642

Procedural note:

You've changed the summary and focus of that ticket.

Do you have the same enviroment as the OP?
(i.e. using generic inlines and the 'Save as' button
functionality but without any multiple user simultaneous
interaction). Have you tried to reproduce it before
editing the ticket?

If not, you might be "stealing" a ticket instead of opening
a completely new one which would be the right thing to do.

Your description of the analysis of the issues doesn't show
you've taken in account OP's issue either it is not clear
both issues are the same.

Regards,

--
Ramiro Morales


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
poswald  
View profile  
 More options Mar 7 2011, 10:17 am
From: poswald <paulosw...@gmail.com>
Date: Mon, 7 Mar 2011 07:17:08 -0800 (PST)
Local: Mon, Mar 7 2011 10:17 am
Subject: Re: Inline formset exception
(Sorry Ramiro, I think I replied directly to you instead of to the
group. Resending here)

Understood. I believed I was adding a testcase and expanding the scope
of the issue but it is certainly possible that they are two separate
causes. I will keep that in mind in the future and will certainly open
a new issue/revert this one here if everyone would prefer.

For what it is worth I was able to reproduce the exception using the
original reporter's code but only if I follow the process I outlined
in my report. I am still unsure as to what the correct behavior for
Django in this situation should be.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ramiro Morales  
View profile  
 More options Mar 8 2011, 10:56 am
From: Ramiro Morales <cra...@gmail.com>
Date: Tue, 8 Mar 2011 15:56:06 +0000
Local: Tues, Mar 8 2011 10:56 am
Subject: Re: Inline formset exception

On Mon, Mar 7, 2011 at 3:17 PM, poswald <paulosw...@gmail.com> wrote:
> (Sorry Ramiro, I think I replied directly to you instead of to the
> group. Resending here)

> Understood. I believed I was adding a testcase and expanding the scope
> of the issue but it is certainly possible that they are two separate
> causes. I will keep that in mind in the future and will certainly open
> a new issue/revert this one here if everyone would prefer.

> For what it is worth I was able to reproduce the exception using the
> original reporter's code but only if I follow the process I outlined
> in my report.

Actually I've just reproduced (using trunk) the situation reported by the OP:
Simple two-model generic foreign key plus generic inlines setup in the
admin app, activation and usage of the save as button and no need to
add a second browser window in the mix. A very simple
to prepare and reproduce setup.

The other users that added comments to the ticket before
loosely described their problem as not related to the admin inlines
at all rather with more low level model formsets; in any
case they don't provide enough details to be able to know if they
are really contributing to the isolation of the original issue or
simply landed in that ticket with a search and found something
similar in its symptoms to their own issues.

Because of this I'm going to revert your changes to the ticket
and I'd like to ask you to open another ticket and move
what you've found so far there.

We might be in presence of he same issue but I think
the divergence of initial conditions show it's too early
to be sure of that.

Thanks,

--
Ramiro Morales


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
poswald  
View profile   Translate to Translated (View Original)
 More options Mar 9 2011, 4:10 am
From: poswald <paulosw...@gmail.com>
Date: Wed, 9 Mar 2011 01:10:55 -0800 (PST)
Local: Wed, Mar 9 2011 4:10 am
Subject: Re: Inline formset exception
OK, I opened a new ticket for my issue (http://code.djangoproject.com/
ticket/15574) and reverted the subject on the existing ticket #14642
to the original subject. I uploaded the test case I wrote to the new
issue and I'll look to create a test case for #14642 while I'm at it.
Thanks for the advice.

I still would like to get a design decision on what the appropriate
behavior of Django should be when an inline formset form is POSTed
which contains an inline item that has since been deleted on the
server.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »