Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
max_length vs. maxlength
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Brad Fults  
View profile  
 More options Mar 20 2007, 1:20 pm
From: "Brad Fults" <bfu...@gmail.com>
Date: Tue, 20 Mar 2007 10:20:41 -0700
Local: Tues, Mar 20 2007 1:20 pm
Subject: max_length vs. maxlength
In the newforms module, certain Fields have max_length and min_length
attributes [1]. This seems strange because the models API uses
maxlength [2] (note the lack of underscore), as does HTML [3], seen
when creating Widgets in newforms.

Is there a specific reason that newforms' Fields are using an
inconsistent name? If not, I suggest that these all be normalized to
"maxlength" and "minlength".

Thanks.

[1] - http://code.djangoproject.com/browser/django/trunk/django/newforms/fi...
[2] - http://www.djangoproject.com/documentation/model_api/#charfield
[3] - http://www.w3.org/TR/html401/interact/forms.html#adef-maxlength

--
Brad Fults


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Bennett  
View profile  
 More options Mar 20 2007, 1:27 pm
From: "James Bennett" <ubernost...@gmail.com>
Date: Tue, 20 Mar 2007 12:27:13 -0500
Local: Tues, Mar 20 2007 1:27 pm
Subject: Re: max_length vs. maxlength
On 3/20/07, Brad Fults <bfu...@gmail.com> wrote:

> Is there a specific reason that newforms' Fields are using an
> inconsistent name? If not, I suggest that these all be normalized to
> "maxlength" and "minlength".

Actually, the plan over the next couple releases is to normalize to
"max_length" everywhere; we'll probably start out by supporting either
version on models, and then deprecate "maxlength" and remove it
eventually.

--
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
SmileyChris  
View profile  
 More options Mar 20 2007, 3:12 pm
From: "SmileyChris" <smileych...@gmail.com>
Date: Tue, 20 Mar 2007 12:12:47 -0700
Local: Tues, Mar 20 2007 3:12 pm
Subject: Re: max_length vs. maxlength

On Mar 21, 5:27 am, "James Bennett" <ubernost...@gmail.com> wrote:

> On 3/20/07, Brad Fults <bfu...@gmail.com> wrote:

> > Is there a specific reason that newforms' Fields are using an
> > inconsistent name? If not, I suggest that these all be normalized to
> > "maxlength" and "minlength".

> Actually, the plan over the next couple releases is to normalize to
> "max_length" everywhere; we'll probably start out by supporting either
> version on models, and then deprecate "maxlength" and remove it
> eventually.

This even has a ticket which (although I think is pretty solid) could
probably do with some real-world testing!
http://code.djangoproject.com/ticket/2101

So if you want to help out with this normalization Brad (or anyone
else), patch your local copy with that and report back.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adrian Holovaty  
View profile  
 More options Mar 20 2007, 3:14 pm
From: "Adrian Holovaty" <holov...@gmail.com>
Date: Tue, 20 Mar 2007 14:14:21 -0500
Local: Tues, Mar 20 2007 3:14 pm
Subject: Re: max_length vs. maxlength
On 3/20/07, Brad Fults <bfu...@gmail.com> wrote:

> In the newforms module, certain Fields have max_length and min_length
> attributes [1]. This seems strange because the models API uses
> maxlength [2] (note the lack of underscore), as does HTML [3], seen
> when creating Widgets in newforms.

> Is there a specific reason that newforms' Fields are using an
> inconsistent name? If not, I suggest that these all be normalized to
> "maxlength" and "minlength".

Hey Brad,

This thread will answer your question:

http://groups.google.com/group/django-users/browse_thread/thread/a4e0...

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brad Fults  
View profile  
 More options Mar 20 2007, 5:03 pm
From: "Brad Fults" <bfu...@gmail.com>
Date: Tue, 20 Mar 2007 14:03:40 -0700
Local: Tues, Mar 20 2007 5:03 pm
Subject: Re: max_length vs. maxlength
On Mar 20, 12:14 pm, "Adrian Holovaty" <holov...@gmail.com> wrote:

> Hey Brad,

> This thread will answer your question:

> http://groups.google.com/group/django-users/browse_thread/thread/a4e0...

> Adrian

OK, at least it's an intended change. :)

Though, now I'm concerned that max_length on the Field is different
from maxlength (the HTML attribute) on the Widget, which are
frequently specified *right next to* one another. This seems
undesirable.

Thoughts?

--
Brad Fults


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
SmileyChris  
View profile  
 More options Mar 20 2007, 9:18 pm
From: "SmileyChris" <smileych...@gmail.com>
Date: Wed, 21 Mar 2007 01:18:14 -0000
Local: Tues, Mar 20 2007 9:18 pm
Subject: Re: max_length vs. maxlength
On Mar 21, 9:03 am, "Brad Fults" <bfu...@gmail.com> wrote:

> Though, now I'm concerned that max_length on the Field is different
> from maxlength (the HTML attribute) on the Widget, which are
> frequently specified *right next to* one another. This seems
> undesirable.

It's not that "frequent" that you have to explicitly specify the
maxlength html attribute - CharField sets it for you automatically.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »