|
List Info
Thread: Template widget size
|
|
| Template widget size |

|
2006-07-27 15:01:30 |
Is it a desired behaviour of templating system to equalize
text input
widgets?
Although in my model two fields are different sizes
(maxlength=20 and
maxlength=200), inserting into template it generates with
"size=30" tag
equally.
I can manually control it, but why should i do if it knows
everything to
do it right?
Charlie.
--
"...s minden mestert kinevettem, ki nem nevetett
önmagán."
GPG public key: http://www.rendszergazda.com/gpg/charlie-gpg-public-k
ey.asc
--~--~---------~--~----~------------~-------~--~----~
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
django-users-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Template widget size |

|
2006-07-27 16:59:37 |
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
(maxlength=20 and
> maxlength=200), inserting into template it generates
with "size=30"
> tag
> equally.
> I can manually control it, but why should i do if it
knows
> everything to
> do it right?
>
> Charlie.
>
> --
> "...s minden mestert kinevettem, ki nem nevetett
önmagán."
> GPG public key:
http://www.rendszergazda.com/gpg/charlie-gpg-public-
> key.asc
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
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
django-users-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Template widget size |

|
2006-07-27 18:31:18 |
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 key: http://www.rendszergazda.com/gpg/charlie-gpg-public-k
ey.asc
--~--~---------~--~----~------------~-------~--~----~
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
django-users-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Template widget size |

|
2006-07-27 20:32:54 |
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 onclick et al).
--~--~---------~--~----~------------~-------~--~----~
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
django-users-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Template widget size |

|
2006-07-27 20:53:32 |
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 myself).
Jay
Matt the Destroyer wrote:
> 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 onclick et al).
>
--~--~---------~--~----~------------~-------~--~----~
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
django-users-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| delete imagefield |

|
2006-07-27 20:55:10 |
I know this has been asked before, but I can't seem to find
any
helpful answers.
I have an imagefield that is not mandatory (blank=True). In
the
admin, I am able to insert an image, and I can change the
image to
another one. But I am not able to go back to having no
image. Is
there a way to do this? I don't care about deleting the
image from
my file system (I don't expect a lot of images).
I've thought of a way I can do this. I can add a boolean
field
"useImage" (or something similar) to the model.
A checkbox would
appear in the admin, and if the box is unchecked the image
will not
be used. It just seems a shame to do it this way, and I
keep
thinking that there must be a way to simply blank out that
character
field in the database.
So, is there a really obvious solution that I'm missing?
I'm sure
there is, I'm sort of new at all of this. But I just
can't find it
anywhere.
Thanks for the help,
Tamara
--~--~---------~--~----~------------~-------~--~----~
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
django-users-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Template widget size |

|
2006-07-27 22:32:08 |
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
attributes that
>i might want (such as onclick et al).
>
>
No problem with hard-coding. Sooner or later we have to say
something to
the machine. But the equestion is if i say something once
(in the
model), why need to repeat myself?
Say something similar to (pseudo):
ALLOWED_TEXTWIDGET_COUNT = 60
if (model.field.size > ALLOWED_TEXTWIDGET_COUNT):
size_tag = ALLOWED_TEXTWIDGET_COUNT
else:
size_tag = model.field.size
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.
--
"...s minden mestert kinevettem, ki nem nevetett
önmagán."
GPG public key: http://www.rendszergazda.com/gpg/charlie-gpg-public-k
ey.asc
--~--~---------~--~----~------------~-------~--~----~
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
django-users-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Template widget size |

|
2006-07-27 23:30:11 |
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 has no control of how many characters
can be
entered into the field. The "maxlength" html
attribute does control the
number of characters allowed in the field, which CSS
doesn't do, as
stated poorly in my previous email. ;)
Jay
--~--~---------~--~----~------------~-------~--~----~
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
django-users-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Template widget size |

|
2006-07-27 23:44:52 |
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 size, which is the same as the
"size" html
> attribute, which also has no control of how many
characters can be
> entered into the field. The "maxlength"
html attribute does control the
> number of characters allowed in the field, which CSS
doesn't do, as
> stated poorly in my previous email. ;)
Quite seriously, one way to make it easier to evaluate this
would be for
somebody to finish up the remaining parts of ticket #1665.
I'm not
saying 100% it will be accepted, since it leaks a bit across
the line
between representation and presentation, but there may be no
other good
way to do it, so it's not being rejected out of hand.
If you wanted to fix up the TODO items and doc bits of that
ticket, it
will move this closer to resolution one way or the other.
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
django-users-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Template widget size |

|
2006-07-28 00:02:47 |
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
> > > means 2/3 of a box is empty)
> > >
> > > Charlie.
> > >
> > Exactly, the visual size, which is the same as the
"size" html
> > attribute, which also has no control of how many
characters can be
> > entered into the field. The
"maxlength" html attribute does control the
> > number of characters allowed in the field, which
CSS doesn't do, as
> > stated poorly in my previous email. ;)
>
> Quite seriously, one way to make it easier to evaluate
this would be for
> somebody to finish up the remaining parts of ticket
#1665. I'm not
> saying 100% it will be accepted, since it leaks a bit
across the line
> between representation and presentation, but there may
be no other good
> way to do it, so it's not being rejected out of hand.
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.
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
django-users-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
|
|