#4271: Form should use a copy of data passed to it
---------------------------------------------------+------------------------
   Reporter:  Gary Wilson <[EMAIL PROTECTED]>  |                Owner:  adrian  
              
     Status:  closed                               |            Component:  
django.newforms       
    Version:  SVN                                  |           Resolution:  
wontfix               
   Keywords:                                       |                Stage:  
Design decision needed
  Has_patch:  1                                    |           Needs_docs:  0   
                  
Needs_tests:  0                                    |   Needs_better_patch:  0   
                  
---------------------------------------------------+------------------------
Comment (by Gary Wilson <[EMAIL PROTECTED]>):

 For those needing this, here would be a way to put it in your form so that
 the developer using your form doesn't need to know to pass a copy of the
 post data in the view:
 
 {{{
 #!python
 class MyForm(forms.Form):
     def __init__(self, data=None, *args, **kwargs):
         if data:
             data = data.copy()
         super(MyForm, self).__init__(data, *args, **kwargs)
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4271#comment:3>
Django Code <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