# models.py
class Model1 (models.Model):
a = models.CharField()
b = models.CharField()
class Model2 (models.Model):
c = models.CharField()
ab = models.ForeignKey(Model1)
# forms.py
class Form(ModelForm):
class Meta:
model = Model2
fields = ('ab')
widgets = {'ab' : TextInput()}
I want to display a,b fields as TextInputs and not as Options which is
observed by default. However, If I provide TextInput() widget explicitly,
the 'ab' field is working as a single textinput. .
I want to display a, b fields as two textinput's.. how to do that?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.