To configure an application, create an apps.py module inside the
application, then define a subclass of AppConfig there.
When INSTALLED_APPS contains the dotted path to an application module,
by default, if Django finds exactly one AppConfig subclass in the
apps.py submodule, it uses that configuration for the application.
This behavior may be disabled by setting AppConfig.default to False.
If the apps.py module contains more than one AppConfig subclass,
Django will look for a single one where AppConfig.default is True.
If no AppConfig subclass is found, the base AppConfig class will be
used.
Django{a1}已经提供了最好的解释
相关问题 更多 >
编程相关推荐