Django

Code

Ticket #5342 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

EmailField dbfield should accept max_length parameter

Reported by: gwilson Assigned to: donspaulding
Milestone: Component: Core framework
Version: SVN Keywords: sprintsept14
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

new_emailfield.diff (1.0 kB) - added by donspaulding on 09/14/07 11:49:49.
Added the similarly easy documentation change.

Change History

09/06/07 06:43:22 changed by Simon G. <dev@simon.net.nz>

  • needs_better_patch changed.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • needs_docs changed.

Accepted based on comments to the above thread.

09/12/07 14:45:18 changed by donspaulding

  • has_patch set to 1.

(follow-up: ↓ 4 ) 09/13/07 10:38:46 changed by deepak <deep.thukral@gmail.com>

  • needs_better_patch set to 1.

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 ) 09/13/07 12:32:22 changed by donspaulding

  • owner changed from nobody to donspaulding.
  • status changed from new to assigned.

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

09/13/07 13:00:42 changed by deepak <deep.thukral@gmail.com>

  • needs_better_patch deleted.
  • stage changed from Accepted to Ready for checkin.

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

09/13/07 17:21:38 changed by mtredinnick

  • stage changed from Ready for checkin to Design 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.

09/14/07 11:49:49 changed by donspaulding

  • attachment new_emailfield.diff added.

Added the similarly easy documentation change.

09/14/07 11:53:35 changed by adrian

  • stage changed from Design decision needed to Accepted.

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

09/14/07 13:31:28 changed by donspaulding

  • stage changed from Accepted to Ready for checkin.

09/14/07 13:38:27 changed by Fredrik Lundh <fredrik@pythonware.com>

  • keywords set to sprintsept14.

09/14/07 14:22:44 changed by adrian

  • status changed from assigned to closed.
  • resolution set to fixed.

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


Add/Change #5342 (EmailField dbfield should accept max_length parameter)




Change Properties
Action