Django

Code

Ticket #11365 (closed: wontfix)

Opened 1 year ago

Last modified 7 months ago

django.db.models.fields.EmailField max_length should be 254

Reported by: shellsage Assigned to: nobody
Milestone: Component: Database layer (models, ORM)
Version: SVN Keywords: email field max_length
Cc: bas@usagebot.com Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

http://www.eph.co.uk/resources/email-address-length-faq/ points out that the current max_length of 75 on EmailField? fields is too short. It should be extended to 254 to comply with standards.

I checked the EmailField? form field, and it does not seem to enforce a min_length or max_length by default, even though the min_length is 6 chars, and max_length is 254.

Attachments

emailfield-max_length-r11092.patch (0.5 kB) - added by shellsage on 06/24/09 09:06:16.
Patch for correct EmailField? max_length, against r11092

Change History

06/24/09 09:06:16 changed by shellsage

  • attachment emailfield-max_length-r11092.patch added.

Patch for correct EmailField? max_length, against r11092

07/28/09 19:15:04 changed by graham_king

  • needs_better_patch changed.
  • needs_tests changed.
  • needs_docs changed.

+1 because 75 chars is too short to store the Facebook proxied email address that their API dishes out.

07/28/09 19:37:20 changed by russellm

  • status changed from new to closed.
  • resolution set to wontfix.

Firstly, EmailField? accepts a max_length argument, so you can set your email fields to be as long as you like.

Secondly, while I agree that 75 characters isn't strictly standards compliant, it isn't something we can change easily. Changing max_length would be backwards incompatible for every existing installation of Django.

So - when we start having v2.0 discussions, this is one of the backwards incompatible changes will can consider. In the interim, use the max_length argument.

I'm closing this ticket because we don't really have a good way to track 'things we need to do for v2.0'.

08/16/09 20:00:49 changed by anonymous

  • status changed from closed to reopened.
  • resolution deleted.

The issue with this is that the EmailField? is used by the django auth system, so that is directly affected.

08/17/09 08:05:48 changed by dc

  • status changed from reopened to closed.
  • resolution set to wontfix.

Please don't reopen tickets that have been closed by a core committer. If you disagree with a decision, start a thread on django-developers.

02/18/10 00:05:23 changed by anonymous

  • cc set to bas@usagebot.com.

Add/Change #11365 (django.db.models.fields.EmailField max_length should be 254)




Change Properties
Action