That is the Application Configuration feature, new to Django 1.7.
Basically, now you can list in INSTALLED_APPS either the module that contains the application or a class that derives from django.apps.AppConfig and defines the behavior of the application.
This feature provides several advantages:
- Apps can be configured more easily, and even subclassed for customization.
- You can have several apps in the same module.
Application modules can define the special module variable default_app_config to specify the name of their AppConfig, so that they can use the new features without having to specify the full name of that class in INSTALLED_APPS. But this is a backwards compatibility feature and new applications are recommended to write the full AppConfig name.
Anyway, most django/contrib apps use that default_app_config, for compatibility with old configurations. See for example the file django/contrib/messages/__init__.py is just:
from django.contrib.messages.api import *
from django.contrib.messages.constants import *
default_app_config = 'django.contrib.messages.apps.MessagesConfig'
So, adding it up, per OP request:
- If you add in
INSTALLED_APPSthe typenamefoo.apps.FooConfig, then that class will be used to setup thefooapp, 1.7 style (recommended). -
If you add in
INSTALLED_APPSthe plain namefoo, then:- if there is a variable
foo.default_app_configthis class will be used to setup thefooapp, 1.7 style. Most (all?) the standard Django apps have this variable, so that you don’t need to change yourINSTALLED_APPSwhen you upgrade from Django-1.6 to Django-1.7. - if there is not such a variable, then the 1.6 style application will be used, with default values for the advanced configuration options.
- if there is a variable