diff options
| author | Tom Forbes <tom@tomforb.es> | 2020-07-12 13:59:57 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-12-15 11:25:46 +0100 |
| commit | b5e12d490af3debca8c55ab3c1698189fdedbbdb (patch) | |
| tree | 5fe3005ac567f3addf78b81ae033191e2fa642f4 /django/conf/project_template | |
| parent | b960e4ed722a04a9db0d35293f76e253eedf9126 (diff) | |
Fixed #31007 -- Allowed specifying type of auto-created primary keys.
This also changes the default type of auto-created primary keys
for new apps and projects to BigAutoField.
Diffstat (limited to 'django/conf/project_template')
| -rw-r--r-- | django/conf/project_template/project_name/settings.py-tpl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/django/conf/project_template/project_name/settings.py-tpl b/django/conf/project_template/project_name/settings.py-tpl index 444c899b2b..7830fb2f3c 100644 --- a/django/conf/project_template/project_name/settings.py-tpl +++ b/django/conf/project_template/project_name/settings.py-tpl @@ -118,3 +118,8 @@ USE_TZ = True # https://docs.djangoproject.com/en/{{ docs_version }}/howto/static-files/ STATIC_URL = '/static/' + +# Default primary key field type +# https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#default-auto-field + +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' |
