django/tests/migrations
Aymeric Augustin 742ed9878e Refactored registration of models.
Got rid of AppConfig._stub. As a side effect, app_cache.app_configs now
only contains entries for applications that are in INSTALLED_APPS, which
is a good thing and will allow dramatic simplifications (which I will
perform in the next commit). That required adjusting all methods that
iterate on app_configs without checking the "installed" flag, hence the
large changes in get_model[s].

Introduced AppCache.all_models to store models:
- while the app cache is being populated and a suitable app config
  object to register models isn't available yet;
- for applications that aren't in INSTALLED_APPS since they don't have
  an app config any longer.

Replaced get_model(seed_cache=False) by registered_model() which can be
kept simple and safe to call at any time, and removed the seed_cache
argument to get_model[s]. There's no replacement for that private API.

Allowed non-master app caches to go through populate() as it is now
safe to do so. They were introduced in 1.7 so backwards compatibility
isn't a concern as long as the migrations framework keeps working.
2013-12-22 11:39:17 +01:00
..
faulty_migrations Fixed #21302 -- Fixed unused imports and import *. 2013-11-02 15:24:56 -04:00
migrations_test_apps Removed superfluous models.py files. 2013-12-17 11:16:48 +01:00
test_migrations Whitespace cleanup. 2013-10-10 16:49:20 -04:00
test_migrations_2 Whitespace cleanup. 2013-10-10 16:49:20 -04:00
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 Adding a dependency graph class and tests 2013-05-10 12:52:04 +01:00
models.py Deborgified the app cache. 2013-12-17 21:53:18 +01:00
test_autodetector.py Migration VCS conflict detection and --merge for makemigrations 2013-12-04 16:01:49 +00:00
test_base.py Fix some small errors in the tests 2013-08-23 12:07:43 +01:00
test_commands.py Refactored registration of models. 2013-12-22 11:39:17 +01:00
test_executor.py Fixed #21302 -- Fixed unused imports and import *. 2013-11-02 15:24:56 -04:00
test_graph.py Fix graph tests 2013-05-30 17:56:53 +01:00
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 Deborgified the app cache. 2013-12-17 21:53:18 +01:00
test_writer.py Moved the new app cache inside core. 2013-12-17 10:17:46 +01:00