On Fri, 2006-10-27 at 00:30 +1000, Malcolm Tredinnick wrote:
> On Thu, 2006-10-26 at 14:38 +0200, Benedict Verheyen wrote:
> > Benedict Verheyen schreef:
> > > Hi,
> > > 
> > > a have a charfield of 255 chars in a model but on the form, it
> > > consists of a smallish
> > > inputfield instead of a textarea.
> > > How can i increase the size of the form element?
> > > 
> > > Thanks
> > > Benedict
> > 
> > The solution with changing the CharField length property works.
> > But then it still doesn't make a textarea but rather a very very long
> > input field :)
> > 
> > As xav suggested, changing the model to TextField instead solves it.
> > But the resulting textarea is really big. Ideally, we should be able to
> > specify in the model how the textarea should look.
> > Maybe specifying the width & height or the rows/columns.
> 
> We've had this discussion before, search the archives for the discussion
> (end of July was certainly one time it popped up).
> 
> In general, we want like to avoid putting presentation related
> information into models, since they should be presentation independent
> as much as possible. The fact that we haven't avoided that entirely so
> far isn't an excuse to slide further down that slope.

Sorry, I should clarify this slightly, since I was about to go to sleep
when I wrote it and I was lazy with words. Previous conversations were
about trying to keep large amounts of presentation configuration out of
the field definitions. It may be that having an inner class to define
the default presentation in some way is an option (although I'm
personally not that keen on that one) -- one of the unresolved points
previously was for people to come up with some plausible alternatives.
This all hooks in a bit with how default forms are constructed from
models (currently default manipulators -- in a few months... *shrug*),
so it's not a ten minute problem.

Regards,
Malcolm



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

Reply via email to