1
0
mirror of https://github.com/django/django.git synced 2025-01-08 17:37:20 +00:00
django/tests/migrations
Aymeric Augustin b55282b98b Moved list of models inside AppConfig instances.
This commit is a refactoring with no change of functionality, according
to the following invariants:

- An app_label that was in app_configs and app_models stays in
  app_config and has its 'installed' attribute set to True.

- An app_label that was in app_models but not in app_configs is added to
  app_configs and has its 'installed' attribute set to True.

As a consequence, all the code that iterated on app_configs is modified
to check for the 'installed' attribute. Code that iterated on app_models
is rewritten in terms of app_configs.

Many tests that stored and restored the state of the app cache were
updated.

In the long term, we should reconsider the usefulness of allowing
importing models from non-installed applications. This doesn't sound
particularly useful, can be a trap in some circumstances, and causes
significant complexity in sensitive areas of Django.
2013-12-17 10:17:44 +01:00
..
faulty_migrations Fixed #21302 -- Fixed unused imports and import *. 2013-11-02 15:24:56 -04:00
migrations_test_apps
test_migrations
test_migrations_2
test_migrations_conflict Migration VCS conflict detection and --merge for makemigrations 2013-12-04 16:01:49 +00:00
test_migrations_squashed Fix migration planner to fully understand squashed migrations. And test. 2013-10-23 22:56:54 +01:00
__init__.py
models.py Moved django.db.models.loading to django.apps.cache. 2013-12-17 10:17:43 +01:00
test_autodetector.py Migration VCS conflict detection and --merge for makemigrations 2013-12-04 16:01:49 +00:00
test_base.py
test_commands.py Moved list of models inside AppConfig instances. 2013-12-17 10:17:44 +01:00
test_executor.py Fixed #21302 -- Fixed unused imports and import *. 2013-11-02 15:24:56 -04:00
test_graph.py
test_loader.py Fix migration planner to fully understand squashed migrations. And test. 2013-10-23 22:56:54 +01:00
test_operations.py Moved list of models inside AppConfig instances. 2013-12-17 10:17:44 +01:00
test_optimizer.py flake8 fixes 2013-11-06 20:00:48 -08:00
test_state.py Moved django.db.models.loading to django.apps.cache. 2013-12-17 10:17:43 +01:00
test_writer.py Removed module-level functions for the app cache. 2013-12-17 10:17:44 +01:00