Hallöchen!
I use newforms.ModelForm to get a form from one of my models.
However, the HTML <input> fields are all too wide. Okay, I could
re-define all fields that need narrower <input>s like
class SixChamberChannelForm(ModelForm):
gas = forms.CharField(widget=forms.TextInput(attrs={"size": "10"}))
diluted_in = forms.CharField(widget=forms.TextInput(attrs={"size": "10"}))
class Meta:
model = models.SixChamberChannel
however, then I lose the information contained in max_length and
help_text in the model. How can I just put a "size" attribute to
the fields?
Tschö,
Torsten.
--
Torsten Bronger, aquisgrana, europa vetus
Jabber ID: [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
-~----------~----~----~----~------~----~------~--~---