title: Django - dynamic number of fields on a form
body: <p>I've spent last 24 hours bashing my head against the wall trying to solve this problem. I already know that on this board there are at least 10 similar questions. Why I'm still asking? Well, because no solution seems to work :). Here's the code:</p>
  
  <pre><code>class MyAdminForm(forms.ModelForm):   
      some_field = forms.CharField()
  
      def __init__(self, *args, **kwargs):
          super(MyAdminForm, self).__init__(*args, **kwargs)
  
          for i in range(0, 10):
              self.fields['file_field_%d' % i] = forms.FileField()
  </code></pre>
  
  <p>This code renders only some_field, and nothing else. It doesn't seem to care I'm adding 10 filefields. Django ver is 1.3.1</p>