Skip to content

Commit

Permalink
Recommended against default_app_config.
Browse files Browse the repository at this point in the history
Most likely this is a losing fight -- people seem to love this small
convention -- but at least the reasons for avoiding it will be
documented.

Refs #25356.
  • Loading branch information
aaugustin committed Sep 22, 2015
1 parent f2975c0 commit 94a36cf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/ref/applications.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ subclass for that application.
If there is no ``default_app_config``, Django uses the base
:class:`~django.apps.AppConfig` class.

``default_app_config`` allows applications that predate Django 1.7 such as
``django.contrib.admin`` to opt-in to :class:`~django.apps.AppConfig` features
without requiring users to update their :setting:`INSTALLED_APPS`.

New applications should avoid ``default_app_config``. Instead they should
require the dotted path to the appropriate :class:`~django.apps.AppConfig`
subclass to be configured explicitly in :setting:`INSTALLED_APPS`.

For application authors
-----------------------

Expand Down

0 comments on commit 94a36cf

Please sign in to comment.