sry...the second link was:
http://www.djangosnippets.org/snippets/1389/

andreas wrote:
> ok... i found:
> http://groups.google.com/group/django-users/browse_thread/thread/ca0efab7f9fa7f86?pli=1
> and
> http://groups.google.com/group/django-users/browse_thread/thread/ca0efab7f9fa7f86?pli=1
>
> which is about adding additional formset forms.
>
>
>
> On Dec 2, 4:59 pm, andreas schmid <a.schmi...@gmail.com> wrote:
>   
>> hi,
>>
>> im trying to create a form based on 2 models where model B will be a
>> inlineformset related to model A.
>> how can i tell the formset forms (model B) that the related instance is
>> the just created instance based on model A?
>>
>> lets say i want to create the author and assign him many books in one shot.
>> i get the form displayed but after the submit i get a:
>>
>>     Cannot assign "<Book: >": "Book.author" must be a "Author" instance.
>>
>> http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#using-a...
>>
>> only tells how to create Book instances related to an existing author.
>> (i admit i didnt try to hard today)
>>
>> another question i have is: do i have to define the amount of books in
>> advance with extra= or is there a way to get a plus icon where i can
>> click on and get a formset.form more 
>> displayed?http://docs.djangoproject.com/en/dev/topics/forms/formsets/#s-adding-...
>> here i can see an explaination about how to add fields... i would need
>> something like can_delete or can_order but for adding new forms to the
>> formset.
>>
>> thank you
>>     
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>
>
>   

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to