1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Updated the AppCommand API to support apps without a models module.

This commit is contained in:
Aymeric Augustin
2013-12-24 23:43:47 +01:00
parent aff57793b4
commit bb8ec71f61
4 changed files with 63 additions and 27 deletions

View File

@@ -593,6 +593,10 @@ methods are only referring to fields or other items in ``model._meta``.
App-loading changes
~~~~~~~~~~~~~~~~~~~
Subclasses of :class:`~django.core.management.AppCommand` must now implement a
:meth:`~django.core.management.AppCommand.handle_app_config` method instead of
``handle_app()``. This method receives an :class:`~django.apps.AppConfig` instance.
Since :setting:`INSTALLED_APPS` now supports application configuration classes
in addition to application modules, you should review code that accesses this
setting directly and use the app registry (:attr:`django.apps.apps`) instead.