Alle venerdì 04 maggio 2007, Pythoni ha scritto:
> But I would need at least rows="20" cols="70".
> Is there a way how to change the size from Django directly and not by
> editing HTML code?
> Thank you
> L.B.

with newforms is very simple.
you create the form from the model, like
ContactForm = forms.models.form_for_model(Contact)

and then you can change the atttribute:
ContactForm.base_fields ["name"].widget.attrs ["size"] = "50"

or 

ContactForm.base_fields ["message"].widget.attrs ["rows"] = "10"
ContactForm.base_fields ["message"].widget.attrs ["cols"] = "50"

please tell me if it's the solution for your problem.
-- 
Alessandro Ronchi
Skype: aronchi - Wengo: aleronchi
http://www.alessandroronchi.net - Il mio sito personale
http://www.soasi.com - Sviluppo Software e Sistemi Open Source

--~--~---------~--~----~------------~-------~--~----~
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