1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00
django/tests/proxy_models
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
..
fixtures Fixed #20777 -- Admin proxy model deletion regression 2013-08-19 09:51:41 +03:00
__init__.py
admin.py Fixed #20777 -- Admin proxy model deletion regression 2013-08-19 09:51:41 +03:00
models.py Fixing E302 Errors 2013-11-02 23:48:47 -05:00
tests.py Refactored registration of models. 2013-12-22 11:39:17 +01:00
urls.py Fixed #20777 -- Admin proxy model deletion regression 2013-08-19 09:51:41 +03:00