I've a question, why max. size of User.email field is set to 75
characters,
if RFC 2821 limits local part to 64 characters and domain to 255.
With '@' it is together 320 chars.
Should not be this field extended?
I don't see why it needs to be configurable. Email have a fixed finite
maximum length - it isn't something that requires configuration on a
per-site basis.
75 characters has certainly served me well enough as a max_length, but
if the RFC allows up to 320, then we should probably look at changing
the default. However, this will be a backwards incompatible change
(not a particularly worrisome one), so we need to consider the
benefits.
Put me down as a +0. For completeness, the change is desirable, but I
can't say I've come across many 320 character email addresses in my
time. If it didn't change, I don't know that I would be too worried.
Yours,
Russ Magee %-)
I agree. -1 on making it customizable.
In the very rare case where somebody really needs another value, it will
easy to roll their own using a TextField and the right validator and
form widget.
> 75 characters has certainly served me well enough as a max_length, but
> if the RFC allows up to 320, then we should probably look at changing
> the default. However, this will be a backwards incompatible change
> (not a particularly worrisome one), so we need to consider the
> benefits.
>
> Put me down as a +0. For completeness, the change is desirable, but I
> can't say I've come across many 320 character email addresses in my
> time. If it didn't change, I don't know that I would be too worried.
I'm probably about +0.5 on making the change prior to 1.0 at some point.
It will be harder to change later. 320 is way too big in practice, but
there's only one reason I would hesitate to pick it as a value: if any
database servers we support have larger storage requirements beyond 255
characters (MySQL in some version springs to mind, but I can't remember
the version numbers). A sane server will implement a VARCHAR (or
equivalent) field as a length plus data, so all values are pretty much
the same.
Regards,
Malcolm
--
Depression is merely anger without enthusiasm.
http://www.pointy-stick.com/blog/
It was kind of a pain to have to override everything everywhere in my
production app, but I only had to do it once, so... it's not too high
on my list of things that have ever annoyed me :)
Clint
--
Clint Ecker
Sr. Web Developer - Stone Ward Chicago
p: 312.464.1443
c: 312.863.9323
---
twitter: clint
skype: clintology
AIM: idiosyncrasyFG
Gtalk: clint...@gmail.com
Ok, fair enough. But 75 isn't long enough, and if we don't want to go
up to 320 then what length should it be? 255?
I don't see the harm in allowing a max_length parameter to be specified,
similar to how the URLField was changed a while back [1]. IMO, this is the
sort of thing frameworks are good for; make the common things easy and the
not-so-common things possible. No matter how high we raise the default,
someone's always going to want/need more.
So count me as +1 for allowing max_length, keeping the default at 75, no
backwards incompatibility, and never having to deal with this issue again.
Gary