django1/django
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
..
bin Started attackign the next flake8 violation 2013-10-31 08:42:28 -07:00
conf Simplied some code in django.conf.__init__. 2013-12-18 18:23:25 -05:00
contrib Revert "Changed admin/templates/admin/index.html to make <caption> translatable" 2013-12-20 15:19:03 +01:00
core Refactored registration of models. 2013-12-22 11:39:17 +01:00
db Refactored registration of models. 2013-12-22 11:39:17 +01:00
dispatch Fixed E127 pep8 warnings. 2013-12-14 11:59:15 -05:00
forms Refs #17413 -- Added isinstance backward compatibility on ErrorList. 2013-12-18 08:59:53 -05:00
http Fixed E127 pep8 warnings. 2013-12-14 11:59:15 -05:00
middleware Fixed #21473 -- Limited language preservation to logout 2013-12-12 10:24:43 +01:00
template Small flake8 fixes -- number of blank lines between top level definitions 2013-12-19 20:43:34 -08:00
templatetags A handful of flake8 fixes 2013-11-23 08:26:11 -08:00
test Set stacklevel for the override_settings warning. 2013-12-20 11:09:06 +01:00
utils Added a context manager to hold the import lock. 2013-12-22 11:39:17 +01:00
views Fixed #21564 -- Use local request object when possible in generic views. 2013-12-16 16:58:08 +01:00
__init__.py Started attackign the next flake8 violation 2013-10-31 08:42:28 -07:00
shortcuts.py Changed shortcuts from being a package to just being a module 2013-11-19 15:34:20 -08:00