Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#859 closed defect (wontfix)

CharField shouldn't require a maxlength

Reported by: aaronsw Owned by: adrian
Component: Database layer (models, ORM) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Coming up with the maxlength for a CharField is a difficult and frustrating problem. By default, it should just make it as long as possible or as reasonable, so that users don't have to worry about such nonsense.

Change History (5)

comment:1 Changed 9 years ago by adrian

  • Resolution set to wontfix
  • Status changed from new to closed

If you'd rather not specify a maxlength, just use TextField.

comment:2 Changed 9 years ago by anonymous

  • Resolution wontfix deleted
  • Status changed from closed to reopened

TextFields appear as <textarea>s and not <input type="text">.

comment:3 Changed 9 years ago by adrian

  • Resolution set to wontfix
  • Status changed from reopened to closed

anonymous: CharFields requires a maxlength parameter. If you don't want to set a limit on text-based database fields, use TextField. Guessing a maxlength automatically is, frankly, quite silly.

comment:4 Changed 9 years ago by anonymous

Why?

comment:5 Changed 9 years ago by sune.kirkeby@…

Explicit is better than implicit; so when you ask for a field of a type which requires a length, Django should
not try to guess what you want.

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