Re: Hiding Relationships in Forms

2007-02-27 Thread Caz
> > So far, if I do: > > del DoseForm.base_fields['appointment'] > del DoseForm.base_fields['order'] > Here's what I do: UserProfileForm = forms.models.form_for_model(UserProfile,formfield_callback=lambda i: {'user':None}.get(i.name,i.formfield())) This removes the 'user' foreign key from the m

Hiding Relationships in Forms

2007-02-26 Thread stevelewis
I have a page where I want to display two Form objects, and that's working fine. I have three Model objects that map to these two Form objects, and I was hoping to avoid showing the relationships that are redundant. What's the best way to do this? So far, if I do: del DoseForm.base_fields['appo