Re: How to add a FileField to a dynamically created form

2010-09-08 Thread David De La Harpe Golden
On 07/09/10 20:56, ranjan.kumar wrote > forms.FileField(upload_to='some_dir/') > > The error message that i'm getting is: init() got an unexpected > keyword argument ‘upload_to’ > You're confusing forms.FileField [1] and models.FileField [2] The latter is the one that takes the upload_to

How to add a FileField to a dynamically created form

2010-09-07 Thread ranjan.kumar
Hi, How can we dynamically add a fileField to the dynamic form. I tried doing that using the following code but it is throwing errors. from django import forms class QuestionsForm(forms.Form): def __init__(self, questions, *args, **kwargs): super(QuestionsForm, self).__init__(*args,