#12749: "Please correct the error below." when saving add model form with inline
formset and no auto primary key.
---------------------------------------------+------------------------------
          Reporter:  [email protected]  |         Owner:  nessita
            Status:  assigned                |     Milestone:  1.2    
         Component:  django.contrib.admin    |       Version:  SVN    
        Resolution:                          |      Keywords:         
             Stage:  Accepted                |     Has_patch:  1      
        Needs_docs:  0                       |   Needs_tests:  0      
Needs_better_patch:  0                       |  
---------------------------------------------+------------------------------
Comment (by nessita):

 I've reproduced the problem using the attached models.py and tests.py
 files.
 After a lot of (a little bit frustrating) debugging, I've come up to the
 following conclusions:

  * The design presented by the reporter doesn't seem to make sense, since
 it generates a mutual dependency between the model ''Fashionista'' and
 ''ShoppingWeakness'': to create a ''Fashionista'', an instance of
 ''ShoppingWeakness'' is needed; and to create the latter, an instance of
 ''Fashionista'' is needed.

  * The attempt to create a ''Fashionista'' ends up with the error
  {{{Model fashionista with pk 1 does not exist}}}
  but this error is never shown in the admin's change_form.html, so the
 user only sees the {{{Please correct the error below}}} message and
 nothing else.

  * When printing the {{{{{ errors }}}}} value in the change_form.html
 template, there seems to be a buggy generated HTML, as per the screenshot
 attached.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12749#comment:4>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

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

Reply via email to