Hi,

I'm trying to run the example at documentation about formsets(https://
docs.djangoproject.com/en/1.2/topics/forms/formsets/)

It basically works, but the "extra" parameter doesn't:

Following that example, I wrote:

def fs(request):
    ArticleFormSet = formset_factory(ArticleForm, extra=5 )
    formset = ArticleFormSet()
    print 'length:' + (str)(len(formset.forms))

    for form in formset.forms:
        print form.as_table()
        return render_to_response('fs.html', {'formset': formset },)

And I get at output:

length:5
<tr><th><label for="id_form-0-title">Title:</label></th><td><input
type="text" name="form-0-title" id="id_form-0-title" /></td></tr>
<tr><th><label for="id_form-0-pub_date">Pub date:</label></
th><td><input type="text" name="form-0-pub_date" id="id_form-0-
pub_date" /></td></tr>
[09/Nov/2011 22:26:35] "GET /formsettest/ HTTP/1.1" 200 27


ONLY one form (expected five :-( )

Any help will be really appreciated!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" 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-users?hl=en.

Reply via email to