4 ms·
This covers it quite nicely https://django.doctor/advice/C2006 https://django.doctor/advice/C2006
by rikatee 6y ago
This covers it quite nicely https://django.doctor/advice/C2006 https://django.doctor/advice/C2006
- solox3 6y agoThanks for replying, and yes that is the page about which I have questions. * The error code C2006 assumes there is a clear divide between "smaller" and "larger" strings. What is smaller, and what is larger? Is 1000 large? Is 5000 large? Is 1000000 large? If I want my comment to be capped at 5000 characters to encourage healthy discussions but prevent spamming, is it large? * If a field has no "known format" and that's where it draws the line between CharField and TextField, then why is the error C2006 still raised when TextField(max_length=5000) is used? Why does the validator recommend allowing anyone to insert entries of unlimited size?