On May 5, 4:27 am, Alessandro Ronchi <[EMAIL PROTECTED]>
wrote:
> 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
Thank you ALL who replied to help me solve the problem.
Unfortunately my program still uses  0.91 Django version so I do not
think I can use newforms.
Would be there any solution with oldforms? Or would you recommend to
add, to the form,  HTML code of text area like this:

<textarea id="id_Description" class="vLargeTextField required"
name="Description" rows="20" cols="70"></textarea>


?
(That code is generated by Django)

But then I do not know how easy it would be to fill in the input text
area with the data to be edited.
Any idea would be appreciated
 L.



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