It's a difference between RDBMS's varchar
(or similar) — those are usually specified with a maximum length, and might be more efficient in terms of performance or storage — and text
(or similar) types — those are usually limited only by hardcoded implementation limits (not a DB schema).
PostgreSQL 9, specifically, states that "There is no performance difference among these three types", but AFAIK there are some differences in e.g. MySQL, so this is something to keep in mind.
A good rule of thumb is that you use CharField
when you need to limit the maximum length, TextField
otherwise.
This is not really Django-specific, also.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…