newforms: max_length or maxlength

0 views
Skip to first unread message

Michel Thadeu Sabchuk

unread,
Jan 22, 2007, 11:02:40 AM1/22/07
to Django users
Hi guys!

The newforms.CharField class expects a max_length keyword to define the
max_length, the models.CharField expects a maxlength keyword (without
the underscore). Shouldn't the newforms.CharField class use maxlength
too?

Thanks

Michel Thadeu Sabchuk

Adrian Holovaty

unread,
Jan 22, 2007, 11:47:32 AM1/22/07
to django...@googlegroups.com
On 1/22/07, Michel Thadeu Sabchuk <mich...@gmail.com> wrote:
> The newforms.CharField class expects a max_length keyword to define the
> max_length, the models.CharField expects a maxlength keyword (without
> the underscore). Shouldn't the newforms.CharField class use maxlength
> too?

Hi Michel,

The newforms.CharField class intentionally uses max_length rather than
maxlength. We'll eventually be changing the model field syntax to use
max_length rather than maxlength, so this was a futureproofing
decision.

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com

Reply all
Reply to author
Forward
0 new messages