On Sat, May 14, 2011 at 6:56 PM, Shawn Milochik <sh...@milochik.com> wrote: > If you're using forms.Form objects instead of forms.ModelForm objects then > that would explain it. If you're dealing with a model then you should > probably be using a ModelForm. > > To have a ModelForm that doesn't show certain fields just add a Meta section > and set the field names in an iterable named 'exclude'.
I have from django.db import models from django.forms import ModelForm class Contact( models.Model ): company = models.ForeignKey( Company ) name = models.CharField( max_length=32 ) class ContactForm( ModelForm ): class Meta: model = Contact name = CharField( required=True ) The fields failing validation are ones I'm not re-submitting back in my edit form. Am I supposed to list company again in my ContactForm class? Guess I can go try it. -- Greg Donald destiney.com | gregdonald.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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.