mirror of
https://github.com/ansible/awx.git
synced 2026-05-11 19:37:38 -02:30
Fix up warnings
- the default auto-increment primary key field type is now configurable, and Django's check command issues a warning if you are just assuming the historical behavior of using AutoField. - Django 3.2 brings in automatic AppConfig discovery, so all of our explicit `default_app_config = ...` assignments in __init__.py modules are no longer needed, and raise a RemovedInDjango41Warning.
This commit is contained in:
@@ -7,8 +7,6 @@ from django.utils.module_loading import autodiscover_modules
|
|||||||
# AWX
|
# AWX
|
||||||
from .registry import settings_registry
|
from .registry import settings_registry
|
||||||
|
|
||||||
default_app_config = 'awx.conf.apps.ConfConfig'
|
|
||||||
|
|
||||||
|
|
||||||
def register(setting, **kwargs):
|
def register(setting, **kwargs):
|
||||||
settings_registry.register(setting, **kwargs)
|
settings_registry.register(setting, **kwargs)
|
||||||
|
|||||||
@@ -1,4 +1,2 @@
|
|||||||
# Copyright (c) 2015 Ansible, Inc.
|
# Copyright (c) 2015 Ansible, Inc.
|
||||||
# All Rights Reserved.
|
# All Rights Reserved.
|
||||||
|
|
||||||
default_app_config = 'awx.main.apps.MainConfig'
|
|
||||||
|
|||||||
@@ -41,6 +41,11 @@ else:
|
|||||||
DEBUG = True
|
DEBUG = True
|
||||||
SQL_DEBUG = DEBUG
|
SQL_DEBUG = DEBUG
|
||||||
|
|
||||||
|
# FIXME: it would be nice to cycle back around and allow this to be
|
||||||
|
# BigAutoField going forward, but we'd have to be explicit about our
|
||||||
|
# existing models.
|
||||||
|
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
|
||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
'default': {
|
||||||
'ENGINE': 'django.db.backends.sqlite3',
|
'ENGINE': 'django.db.backends.sqlite3',
|
||||||
|
|||||||
@@ -1,4 +1,2 @@
|
|||||||
# Copyright (c) 2015 Ansible, Inc.
|
# Copyright (c) 2015 Ansible, Inc.
|
||||||
# All Rights Reserved.
|
# All Rights Reserved.
|
||||||
|
|
||||||
default_app_config = 'awx.sso.apps.SSOConfig'
|
|
||||||
|
|||||||
@@ -1,4 +1,2 @@
|
|||||||
# Copyright (c) 2015 Ansible, Inc.
|
# Copyright (c) 2015 Ansible, Inc.
|
||||||
# All Rights Reserved.
|
# All Rights Reserved.
|
||||||
|
|
||||||
default_app_config = 'awx.ui.apps.UIConfig'
|
|
||||||
|
|||||||
Reference in New Issue
Block a user