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.

On Saturday, November 14, 2020 at 11:32:38 AM UTC-5 [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/2cd6c330-0439-4ee7-88f5-b2ac708c78e0n%40googlegroups.com.

Reply via email to