awx/awx/conf/__init__.py
Jeff Bradberry 38ccea0f1f 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.
2022-03-14 13:19:57 -04:00

21 lines
444 B
Python

# Copyright (c) 2016 Ansible, Inc.
# All Rights Reserved.
# Django
from django.utils.module_loading import autodiscover_modules
# AWX
from .registry import settings_registry
def register(setting, **kwargs):
settings_registry.register(setting, **kwargs)
def register_validate(category, func):
settings_registry.register_validate(category, func)
def autodiscover():
autodiscover_modules('conf', register_to=settings_registry)