#10828: deleting all forms within a formset is not possible
----------------------+-----------------------------------------------------
 Reporter:  patrickk  |       Owner:  nobody    
   Status:  new       |   Milestone:            
Component:  Forms     |     Version:  SVN       
 Keywords:            |       Stage:  Unreviewed
Has_patch:  0         |  
----------------------+-----------------------------------------------------
 when using a formset with can_delete and trying to delete _all_ items
 within the formset, I´m getting this error:
 'MyForm' object has no attribute 'cleaned_data'

 the problem here seems to be that formset.is_valid() is True, but
 cleaned_data (which is used afterwards, of course) is not available.
 this could be solved with using a custom BaseFormSet and overriding the
 clean-method. unfortunately, the clean-method is not called in the case
 where all items are deleted.

 I´ve done a bit of research on this issue and I found this related topic:
 http://groups.google.com/group/django-developers/msg/b11309999f1b3e06

 although I think it´s a pretty good idea that deleted items don´t throw
 validation errors, I´m not sure if the above behaviour is intended.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10828>
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