Re: Models, forms and inlineformset

2010-01-30 Thread andreas schmid
it works now :) thank you!! Stefan Nitsche wrote: > On Sat, Jan 30, 2010 at 11:23, andreas schmid > wrote: > > Stefan Nitsche wrote: > > > > > > On Thu, Jan 28, 2010 at 10:15, andreas schmid > mailto:a.schmi...@gmail.com> > >

Re: Models, forms and inlineformset

2010-01-30 Thread Stefan Nitsche
On Sat, Jan 30, 2010 at 11:23, andreas schmid wrote: > Stefan Nitsche wrote: > > > > > > On Thu, Jan 28, 2010 at 10:15, andreas schmid > > wrote: > > > > and your form works on edit too? > > i really cant understand why mine isnt... > > > > its giving me

Re: Models, forms and inlineformset

2010-01-30 Thread andreas schmid
Stefan Nitsche wrote: > > > On Thu, Jan 28, 2010 at 10:15, andreas schmid > wrote: > > and your form works on edit too? > i really cant understand why mine isnt... > > its giving me this MultiValueDictKeyError which i dont understand. > > Stefan Nitsche

Re: Models, forms and inlineformset

2010-01-29 Thread Stefan Nitsche
On Thu, Jan 28, 2010 at 10:15, andreas schmid wrote: > and your form works on edit too? > i really cant understand why mine isnt... > > its giving me this MultiValueDictKeyError which i dont understand. > > Stefan Nitsche wrote: > > On Wed, Jan 27, 2010 at 14:04, andreas schmid >

Re: Models, forms and inlineformset

2010-01-28 Thread andreas schmid
i forgot to add my edit view: @login_required def edit_projectidea(request, slug): projectidea = get_object_or_404(Projectidea, slug=slug) activity_formset = inlineformset_factory(Projectidea, Activity, extra=7) form = ProjectideaForm(instance=projectidea) formset = activity_formse

Re: Models, forms and inlineformset

2010-01-28 Thread andreas schmid
and your form works on edit too? i really cant understand why mine isnt... its giving me this MultiValueDictKeyError which i dont understand. Stefan Nitsche wrote: > On Wed, Jan 27, 2010 at 14:04, andreas schmid > wrote: > > is this an add or an edit form? or bot

Re: Models, forms and inlineformset

2010-01-27 Thread Stefan Nitsche
On Wed, Jan 27, 2010 at 14:04, andreas schmid wrote: > is this an add or an edit form? or both? > > i have a similar inlineformset and i need to loop over the inline > objects to set the foreignkey to the parent object like: > >if form.is_valid() and formset.is_valid(): # All validation rules

Re: Models, forms and inlineformset

2010-01-27 Thread andreas schmid
is this an add or an edit form? or both? i have a similar inlineformset and i need to loop over the inline objects to set the foreignkey to the parent object like: if form.is_valid() and formset.is_valid(): # All validation rules pass new_idea = form.save(commit=False)

Re: Models, forms and inlineformset

2010-01-23 Thread Stefan Nitsche
On Mon, Jan 4, 2010 at 23:27, Stefan Nitsche wrote: > Hi, > > to begin with I would like to declare that I'm still on the beginner end of > the scale when it comes to Python and Django. > > I have an app which has two models: > > class Item(models.Model): > title = models.CharField() > de

Models, forms and inlineformset

2010-01-04 Thread Stefan Nitsche
Hi, to begin with I would like to declare that I'm still on the beginner end of the scale when it comes to Python and Django. I have an app which has two models: class Item(models.Model): title = models.CharField() description_markdown = models.TextField() class ItemImage(models.Model):