Opened 19 years ago

Closed 19 years ago

Last modified 19 years ago

#859 closed defect (wontfix)

CharField shouldn't require a maxlength

Reported by: aaronsw Owned by: Adrian Holovaty
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: no UI/UX: no

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 by Adrian Holovaty, 19 years ago

Resolution: wontfix
Status: newclosed

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

comment:2 by anonymous, 19 years ago

Resolution: wontfix
Status: closedreopened

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

comment:3 by Adrian Holovaty, 19 years ago

Resolution: wontfix
Status: reopenedclosed

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 by anonymous, 19 years ago

Why?

comment:5 by sune.kirkeby@…, 19 years ago

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