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
--
C
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/a7da67fb-349a-c77c-8324-32dc16bd0ada%40tinbrain.net.
For more options, visit https://groups.google.com/d/optout.