i have the following:
a model:
class MyClass(models.Model):
otherClass = models.ForeignKey('otherClass')
someData = models.CharField(max_length=20)
class MyClassForm(forms.ModelForm):
class Meta:
model = MyClass
fields = ('someData')
When the user edits or adds a MyClass object with the MyClassForm, the
otherClass will always be known. I don't want the user to ever change the
otherClass. What I want it to be in the MyClassForm is a hidden field. I
know I can do this with a Form instead of a ModelForm, but I like the
convenience of the ModelForm. Is there a way to pass hidden inputs through
a ModelForm and still get the convenience of the ModelForm?
Any help would be appreciated.
Thanks,
Rusty Greer
[email protected]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---