--
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-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/EAF4690E-C862-4C68-A7DD-C2979F19BC3C%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CABD5YeFqeRfd6%2BMuMdzsagvjKdNu-iEDND-omuePX9TEw9TGTw%40mail.gmail.com.
On 20201115, at 09:47, Tim Graham <timog...@gmail.com> wrote:Hi Brian, There are existing threads about that (try searching the archives for 'default pk' to find some of them). Here's a PR that adds the setting you described: https://github.com/django/django/pull/13179. Perhaps you would like to try it out and see if it meets your needs.
from django.db import modelsimport uuidclass SomeModel(models.Model):id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)...