Auto-truncating fields at max_length in Django CharFields

前端 未结 4 967
夕颜
夕颜 2020-12-15 16:40

I have a field that has a max_length set. When I save a model instance, and the field\'s value is greater than max_length, Django enforces that

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-15 17:12

    Why don't you use a TextField? From the manual:

    For large amounts of text, use TextField.

提交回复
热议问题