On 10/06/17 22:21, Claude Paroz wrote:
Le samedi 10 juin 2017 11:40:42 UTC+2, Curtis Maloney a écrit :

    Right, hence my point of having a global setting to say "the default
    auto-field is ..."

I see, but this conforms to the pattern "use the same id field type for
all models of my project". I'm not sure we should encourage that.

Yeah... naming would be key with "DEFAULT_AUTO_FIELD_TYPE" or whatever...

Another idea would be to offer variants of models.Model which models
could inherit from, like models.BigIntModel or models.UUIDModel.

Ah, well... now you're talking. But then, you can do this already as an abstract base with TYPE as id...

class BigIntModel(models.Model):
    id = BigAutoField(primary_key=True)
    class Meta:
        abstract = True


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 post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to