Reading the history, I see an awful lot of -1s to the idea of a default.

I see “use a TextField” and “use a subclass” a few times, which were my
immediate thoughts just on the recent emails.

On Sun, 16 Aug 2020 at 18:47, Tom Forbes <t...@tomforb.es> wrote:

> I’m not a fan of implicit max_lengths. Is having to add a keyword argument
> to a model field really that much of a burden? And we also would likely
> never be able to change the default without headaches.
>
> On 12 Aug 2020, at 13:19, t...@carrick.eu <t...@carrick.eu> wrote:
>
> I'd like to revive this discussion and try to come to a consensus as it's
> something I find myself wishing for (for Postgres in particular).
>
> My suggestion, after reading through everything:
>
> 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.
>
> If you set max_length=None explicitly, on Postgres this will use an
> unlimited varchar, on everything else will raise an exception on migrate.
>
> Any thoughts?
>
> Cheers,
> Tom
>
> On Saturday, March 5, 2016 at 2:13:14 PM UTC+1 Shai Berger wrote:
>
>> On Saturday 05 March 2016 02:24:17 Loïc Bistuer wrote:
>>
>>
>> > I’m not too keen on a contrib.pg field. CharField is the base class of
>> many
>>
>>
>> > fields, a __init__ kwarg approach such as max_length=None allows us to
>>
>>
>> > reach those as well.
>>
>>
>> >
>>
>>
>>
>>
>>
>> That's a good point; Can we enable max_length=None in a mixin?
>>
>>
>>
>
>
>
>
> --
>
>
> 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/dfaaa9d3-dff3-46a3-899f-dd7f4eddfe87n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/dfaaa9d3-dff3-46a3-899f-dd7f4eddfe87n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>
>
>
>
>
>
>
>
>
> --
>
>
> 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/468B12C0-2864-4221-9985-044F340E56E1%40tomforb.es
> <https://groups.google.com/d/msgid/django-developers/468B12C0-2864-4221-9985-044F340E56E1%40tomforb.es?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
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/CAJwKpyScwiRJWWebwjQZ4qoQz6_zuWZP9Q_RAs8bxzV0eRMoqQ%40mail.gmail.com.

Reply via email to