title: django select widget doesnt update when i pass the choices into it
body: <p>so im trying to update in my view a select widget as part of a form.</p>
  
  <p>i'e seen tons of stuff on how to do it, i've followed it and got nearly there.
  i've got a bit of code below which is called to populate the select with the choices and it does, but i think the formatting is out, as its passing back a unicode string and i think it needs to be a tuple.</p>
  
  <p>assigning the choices</p>
  
  <pre><code>form.fields['size_option'].widget.attrs['choices'] = Product.get_options(product)
  </code></pre>
  
  <p>the code that generates the choices</p>
  
  <pre><code>def get_options(self):
      optionset = "("
      for option in self.optionset.options.all():
          optionset = optionset + "(\'" + option.name + "\', \'" + option.name + "\')"
      optionset = optionset + ")"
      pdb.set_trace()
      return optionset
  </code></pre>
  
  <p>the html generated for the select is below.</p>
  
  <pre><code>&lt;select id="id_size_option" name="size_option" choices="((&amp;#39;Small&amp;#39;, &amp;#39;Small&amp;#39;)(&amp;#39;Medium&amp;#39;, &amp;#39;Medium&amp;#39;)(&amp;#39;Large&amp;#39;, &amp;#39;Large&amp;#39;))"&gt; 
  </code></pre>
  
  <p></p>
  
  <p>so the problem is probably the optionset passed back. i can guess as much. i just don't know whats wrong with it. i cant find documentation that shows how this should be formatted inside the select.</p>