#5800: could not have several forms instance in a single page without sharing
choicefields data
----------------------------------------------+-----------------------------
   Reporter:  [EMAIL PROTECTED]             |                Owner:  nobody     
    
     Status:  closed                          |            Component:  
django.newforms
    Version:  0.96                            |           Resolution:  
duplicate      
   Keywords:  ChoiceField isolation instance  |                Stage:  
Unreviewed     
  Has_patch:  0                               |           Needs_docs:  0        
      
Needs_tests:  0                               |   Needs_better_patch:  0        
      
----------------------------------------------+-----------------------------
Changes (by Karen Tracey <[EMAIL PROTECTED]>):

  * status:  new => closed
  * needs_better_patch:  => 0
  * resolution:  => duplicate
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 This has the same root problem as #5665.  Trunk no longer exhibits this
 behavior:

 {{{
 >>> from django import newforms as forms
 >>> class A(forms.Form):
 ...      name=forms.CharField()
 ...      books=forms.ChoiceField(choices=())
 ...
 >>> a1=A()
 >>> a2=A()
 >>> str(a1)
 '<tr><th><label for="id_name">Name:</label></th><td><input type="text"
 name="name" id="id_name" /></td></tr>\n<tr><th><label
 for="id_books">Books:</label></th><td><select name="books"
 id="id_books">\n</select></td></tr>'
 >>> str(a2)
 '<tr><th><label for="id_name">Name:</label></th><td><input type="text"
 name="name" id="id_name" /></td></tr>\n<tr><th><label
 for="id_books">Books:</label></th><td><select name="books"
 id="id_books">\n</select></td></tr>'
 >>> a1.fields['books'].choices=[(1,'1'),(2,'2'),(3,'3')]
 >>> str(a1)
 '<tr><th><label for="id_name">Name:</label></th><td><input type="text"
 name="name" id="id_name" /></td></tr>\n<tr><th><label
 for="id_books">Books:</label></th><td><select name="books"
 id="id_books">\n<option value="1">1</option>\n<option
 value="2">2</option>\n<option value="3">3</option>\n</select></td></tr>'
 >>> str(a2)
 '<tr><th><label for="id_name">Name:</label></th><td><input type="text"
 name="name" id="id_name" /></td></tr>\n<tr><th><label
 for="id_books">Books:</label></th><td><select name="books"
 id="id_books">\n</select></td></tr>'
 >>>

 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/5800#comment:1>
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