Hi Brian, In Speedy Net we use a randomly generated string of digits, either 15 digits or 20 digits, as a primary key in all our models. We never use auto-incrementing integers as primary keys. You can take a look at our implementation, especially class *BaseModel* which is the base class for all our models, and class *TimeStampedModel *(most of our models inherit from *TimeStampedModel*):
https://github.com/speedy-net/speedy-net/blob/master/speedy/core/base/models.py We also defined managers with querysets in which *bulk_create()* and *delete()* are disabled. Uri Rodberg, Speedy Net. אורי [email protected] On Sat, Nov 14, 2020 at 6:32 PM Brian Carter <[email protected]> wrote: > Feature Request: > > I like to use the UUIDField as the primary key in my models, and I think > it would be nice to have django expose a setting in the settings.py to > override the default primary key on models. > > Currently, if I don’t specify a field as the primary key, Django > automatically uses an AutoField (auto-incrementing integer). I’d like to be > able to automatically use a UUID field, but then still be overridden in a > specific model if I specify a different primary key. > > Brian Carter > [email protected] > > -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/EAF4690E-C862-4C68-A7DD-C2979F19BC3C%40gmail.com > . > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CABD5YeFqeRfd6%2BMuMdzsagvjKdNu-iEDND-omuePX9TEw9TGTw%40mail.gmail.com.
