Hi

I have a formset that is created by an inline formset factory. So, I have 
seen that during the creation I can pass the extra argument in order to 
create more blank forms. Fine :)

But I also have the case where I want to pre-populate a formset based on 
entries in the database. In a way I thought I could just hit the database 
and lookup the number of matching entries like objects = 
Model.objects.filter(id=thatid).values().
And then I could pass the individual entry data to the forms in the 
formset. I have managed to do this for one form in the formset, but I do 
not know how to get django to create a formset with x extra forms in it, 
based on the number of database entries. I guess I could again create one 
formset with an inline formset factory, but is it also possible to use the 
initial formset that I already created in my forms.py and to somehow pass 
the extra argument?

Best regards

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a4aa49f0-9d30-4b19-b4cc-e1d715e97674o%40googlegroups.com.

Reply via email to