Opened 17 years ago

Closed 17 years ago

#5342 closed (fixed)

EmailField dbfield should accept max_length parameter

Reported by: Gary Wilson Owned by: donspaulding
Component: Core (Other) Version: dev
Severity: Keywords: sprintsept14
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

EmailField is currently hard-coded to a max length of 75.

Discussion: http://groups.google.com/group/django-developers/browse_frm/thread/662aa47cb546a20/

Attachments (1)

new_emailfield.diff (981 bytes ) - added by donspaulding 17 years ago.
Added the similarly easy documentation change.

Download all attachments as: .zip

Change History (11)

comment:1 by Simon G. <dev@…>, 17 years ago

Triage Stage: UnreviewedAccepted

Accepted based on comments to the above thread.

comment:2 by donspaulding, 17 years ago

Has patch: set

comment:3 by deepak <deep.thukral@…>, 17 years ago

Patch needs improvement: set

IMO, it shouldn't it be more than 255(max varchar) characters in anycase or hard-coded 255 is fine, why it should be configurable?

in reply to:  3 comment:4 by donspaulding, 17 years ago

Owner: changed from nobody to donspaulding
Status: newassigned

Replying to deepak <deep.thukral@gmail.com>:

IMO, it shouldn't it be more than 255(max varchar) characters in anycase or hard-coded 255 is fine, why it should be configurable?

The current standard for email is that the maximum *guaranteed* email address length be 320 chars (64 chars for username, 255 for domain, 1 for '@') [1]. However, to the extent possible, SMTP servers should not limit the size of email addresses. Realizing Django isn't an email server framework, having it provide a reasonable default (75 is arbitrary but backwards compatible) isn't ridiculous, but this patch should let users override the default. Any further discussion should probably be brought back up on the dev mailing list.

[1] - RFC2821 - pages 53-54

comment:5 by deepak <deep.thukral@…>, 17 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

Yes, I am aware of RFC2821, but didnt know about SMTP server no size limits, apologies.

comment:6 by Malcolm Tredinnick, 17 years ago

Triage Stage: Ready for checkinDesign decision needed

The consensus from on the django-dev thread was at least two maintainers were against making it configurable. So I don't there's enough consensus here yet that it's ready-for-checkin. There are some arguments for making it configurable and similar ones against, but we should go through the process.

by donspaulding, 17 years ago

Attachment: new_emailfield.diff added

Added the similarly easy documentation change.

comment:7 by Adrian Holovaty, 17 years ago

Triage Stage: Design decision neededAccepted

Let's do this -- it's clear, obvious and backwards compatible.

comment:8 by donspaulding, 17 years ago

Triage Stage: AcceptedReady for checkin

comment:9 by Fredrik Lundh <fredrik@…>, 17 years ago

Keywords: sprintsept14 added

comment:10 by Adrian Holovaty, 17 years ago

Resolution: fixed
Status: assignedclosed

(In [6205]) Fixed #5342 -- Added max_length parameter to EmailField. Thanks, donspaulding and gwilson

Note: See TracTickets for help on using tickets.
Back to Top