Re: Template widget size

2006-07-30 Thread Nagy Károly
Steven Armstrong írta: >Instead of writing a patch, I've extended/wrapped djangos model and form >fields. This way you can update django without having to reapply patches. > >You can find the code and instructions under [1]. > >Just for the record. I'm totally with Malcolm that this is not a pre

Re: Template widget size

2006-07-29 Thread Steven Armstrong
On 07/28/06 19:20, Nagy Károly wrote: > Steven Armstrong írta: > >>I've extended some of django's built in model and form fields to accept >>an additional kwarg named 'html_attributes'. >> >>It works like this: >> >>class Whatever(models.Model): >> ... >> title = models.CharField(maxlength=1

Re: Template widget size

2006-07-28 Thread Nagy Károly
Malcolm Tredinnick írta: >This is the sort of thing that maybe starts crossing the line between >representation and presentation a bit too much. You are putting a lot of >presentation information into the data model description and they >should, as much as possible be separate. That is why I (and

Re: Template widget size

2006-07-28 Thread Steven Armstrong
On 07/28/06 19:46, Malcolm Tredinnick wrote: > On Fri, 2006-07-28 at 18:19 +0200, Steven Armstrong wrote: >> On 07/28/06 02:02, Malcolm Tredinnick wrote: >> > On Thu, 2006-07-27 at 16:44 -0700, Malcolm Tredinnick wrote: >> >> On Thu, 2006-07-27 at 17:30 -0600, Jay Klehr wrote: >> >> > Nagy Károly

Re: Re: Template widget size

2006-07-28 Thread Joseph Kocherhans
On 7/28/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > Once we take one thing, where does it stop? Ultimately, we are going to > have to draw the line and it will seem arbitrary to people who aren't > thinking of this as "every single presentation item in a model is there > as a slight wart

Re: Template widget size

2006-07-28 Thread Malcolm Tredinnick
On Fri, 2006-07-28 at 18:19 +0200, Steven Armstrong wrote: > On 07/28/06 02:02, Malcolm Tredinnick wrote: > > On Thu, 2006-07-27 at 16:44 -0700, Malcolm Tredinnick wrote: > >> On Thu, 2006-07-27 at 17:30 -0600, Jay Klehr wrote: > >> > Nagy Károly wrote: > >> > > And Jay, (afaik) CSS controls visua

Re: Template widget size

2006-07-28 Thread Nagy Károly
Steven Armstrong írta: >I've extended some of django's built in model and form fields to accept >an additional kwarg named 'html_attributes'. > >It works like this: > >class Whatever(models.Model): > ... > title = models.CharField(maxlength=128, > html_attributes={ > 'size': 15, >

Re: Template widget size

2006-07-28 Thread Steven Armstrong
On 07/28/06 02:02, Malcolm Tredinnick wrote: > On Thu, 2006-07-27 at 16:44 -0700, Malcolm Tredinnick wrote: >> On Thu, 2006-07-27 at 17:30 -0600, Jay Klehr wrote: >> > Nagy Károly wrote: >> > > And Jay, (afaik) CSS controls visual size of field, not the number of >> > > characters you can type in

Re: Template widget size

2006-07-27 Thread Nagy Károly
Malcolm Tredinnick írta: >Sorry, that came across a bit more negatively than I intended: it almost >certainly will be accepted (see the threads linked from the bug). So >it's not a roll of the dice -- the solution isn't ideal, but barring a >better solution, it is a reasonable idea. > > The goa

Re: Template widget size

2006-07-27 Thread Malcolm Tredinnick
On Thu, 2006-07-27 at 16:44 -0700, Malcolm Tredinnick wrote: > On Thu, 2006-07-27 at 17:30 -0600, Jay Klehr wrote: > > Nagy Károly wrote: > > > And Jay, (afaik) CSS controls visual size of field, not the number of > > > characters you can type in (VARCHAR(30) field in 600px input widget > > > mean

Re: Template widget size

2006-07-27 Thread Malcolm Tredinnick
On Thu, 2006-07-27 at 17:30 -0600, Jay Klehr wrote: > Nagy Károly wrote: > > And Jay, (afaik) CSS controls visual size of field, not the number of > > characters you can type in (VARCHAR(30) field in 600px input widget > > means 2/3 of a box is empty) > > > > Charlie. > > > Exactly, the visual

Re: Template widget size

2006-07-27 Thread Jay Klehr
Nagy Károly wrote: > And Jay, (afaik) CSS controls visual size of field, not the number of > characters you can type in (VARCHAR(30) field in 600px input widget > means 2/3 of a box is empty) > > Charlie. > Exactly, the visual size, which is the same as the "size" html attribute, which also ha

Re: Template widget size

2006-07-27 Thread Nagy Károly
Matt the Destroyer írta: >size=30 simply tells the browser to make the input field a size of 30 >characters wide. it has no bearing on input data or transmission. > >in the past, i have simply hard-coded my own input fields into my >templates so I can directly control the size and other attribut

Re: Template widget size

2006-07-27 Thread Jay Klehr
Really the "size" of the form field should be controlled by the CSS, and not the hard coded HTML. Though the "maxlength" attribute could be controlled by Django, and tied to the "maxlength" attribute that you define in Model (and it may be in the admin interface, I haven't actually looked mys

Re: Template widget size

2006-07-27 Thread Matt the Destroyer
size=30 simply tells the browser to make the input field a size of 30 characters wide. it has no bearing on input data or transmission. in the past, i have simply hard-coded my own input fields into my templates so I can directly control the size and other attributes that i might want (such as o

Re: Template widget size

2006-07-27 Thread Nagy Károly
patrickk írta: >maxlength is not a size-attribute. >you probably don´t want size=200, just because maxlength is 200. > > Probably. But i don't want "size=30" either. Is "30" hard-wired or reflects to something? Charlie. -- "...s minden mestert kinevettem, ki nem nevetett önmagán." GPG public

Re: Template widget size

2006-07-27 Thread patrickk
maxlength is not a size-attribute. you probably don´t want size=200, just because maxlength is 200. patrick Am 27.07.2006 um 17:01 schrieb Nagy Károly: > > Is it a desired behaviour of templating system to equalize text input > widgets? > Although in my model two fields are different sizes (max