My 2 cents as a non core developer.

On Wednesday, August 12, 2020, t...@carrick.eu <t...@carrick.eu> wrote:
>
>
> Give CharField a default max_length that is consistent across all vendors.
> It doesn't really matter what the number is other than that it should be
> large enough to be useful but small enough to work everywhere. I think 100
> or 255 are both fine options.
>

I think this could be a good idea, but I think it breaks the ethos of
explicit is better than implicit. I can see where a user/developer would
get errors (validation or db constraints) that would be very confusing as
you would not know where the 100 or 255 value comes from.


> If you set max_length=None explicitly, on Postgres this will use an
> unlimited varchar, on everything else will raise an exception on migrate.
>

This would be very nice to have personally. I think it would need a
security warning in the docs saying that this could be used as a ddos
vector though. And as a potential security issue where is djangos
responsibility to provide a potential footgun?


Bryce

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAEKFToBJ9RJb6EbDh_ydypkgXCL1WZO4k6KENiabOjXR1EcewQ%40mail.gmail.com.

Reply via email to