1
0
mirror of https://github.com/django/django.git synced 2024-12-26 11:06:07 +00:00
Commit Graph

8 Commits

Author SHA1 Message Date
Aymeric Augustin
2bc89f83b3 Removed forgotten reference to the borg pattern. 2013-12-17 22:21:40 +01:00
Aymeric Augustin
0242c56fd8 Deborgified the app cache.
Improved Andrew's hack to create temporary app caches to handle
migrations. Now the main app cache has a "master" flag set to True
(which is a non-default keyword argument, thus unlikely to be used by
mistake). Other app cache instances have "master" set to False.

The only sanctioned way to access the app cache is by importing
django.core.apps.app_cache.

If you were instanciating an app cache and relying on the Borg pattern,
you'll have to refactor your code.
2013-12-17 21:53:18 +01:00
Aymeric Augustin
4a56a93cc4 Moved the new app cache inside core. 2013-12-17 10:17:46 +01:00
Aymeric Augustin
69039becde Deprecated get_app(). 2013-12-17 10:17:45 +01:00
Aymeric Augustin
8662654d6d Removed module-level functions for the app cache.
Since the original ones in django.db.models.loading were kept only for
backwards compatibility, there's no need to recreate them. However, many
internals of Django still relied on them.

They were also imported in django.db.models. They never appear in the
documentation, except a quick mention of get_models and get_app in the
1.2 release notes to document an edge case in GIS. I don't think that
makes them a public API.

This commit doesn't change the overall amount of global state but
clarifies that it's tied to the app_cache object instead of hiding it
behind half a dozen functions.
2013-12-17 10:17:44 +01:00
Aymeric Augustin
860c2c8bc5 Moved django.db.models.loading to django.apps.cache.
This commit doesn't contain any code changes; it's purely a refactoring.
2013-12-17 10:17:43 +01:00
Andrew Godwin
52eb19b545 Make multi-app-cache tests work again 2013-07-22 19:36:03 +01:00
Andrew Godwin
75bf394d86 Rest of the _meta.app_cache stuff. Schema tests work now. 2013-05-09 15:59:26 +01:00