Hallöchen!

bruno desthuilliers writes:

> On 8 juil, 21:06, Torsten Bronger <[EMAIL PROTECTED]>
> wrote:
>
>> 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?
>
> What about using css ?

I had tried and failed.  At least Firefox ignores style="width: 3em"
attributes.

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 django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to