Hi Daniel,

Thanx for the suggestions, i've got it working now! Up to the next
challenge :)

Greets Jop

On 12 jan, 12:17, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On Jan 12, 10:54 am, Jop <jop.reynt...@gmail.com> wrote:
>
>
>
> > Hello,
>
> > I struggeling with an error message for more than a day now and I
> > can't figure out what I'm doing wrong. I'm still kindof a newbie with
> > python/django so it might be very obvious..
>
> > I am trying to create an inline form and I want to hide a field in
> > this form (specific: I want to hide the pk field, for some reason
> > django doesn't hide this one when it has a different name than "id").
> > To achieve this I create a class which inherits admin.StackedInline.
> > In this class I define formset=modelformset_factory(ClientContact).
>
> > When trying to view te form in the admin I get an error, the Traceback
> > is below.
>
> > For testing purposes I made a very simple Client/Client model example,
> > the code is below.
>
> > I really appreciate any tips/suggestions/ideas :)
>
> > Greets Jop
>
> You probably need to use inlineformset_factory.
>
> However, this isn't the way to define a custom form in an inline. Just
> leave the formset as it is, but set the `form` property on the inline
> class to the form you want to use in the formset.
> --
> DR.
-- 
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