diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-18 13:10:23 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-22 11:39:17 +0100 |
| commit | 972babc3b45971a69a6b2a49fc498d92db674cae (patch) | |
| tree | af9865c859f34db473754351511e545a268d6320 /django | |
| parent | 742ed9878e7edbb7a11667c489c719c4d9ab82de (diff) | |
Removed the only_installed argument of get_app_config[s].
It wasn't used anywhere and couldn't be implemented any more since
non-installed apps no longer have a configuration.
Diffstat (limited to 'django')
| -rw-r--r-- | django/core/apps/cache.py | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/django/core/apps/cache.py b/django/core/apps/cache.py index deffc84586..69f2f2c974 100644 --- a/django/core/apps/cache.py +++ b/django/core/apps/cache.py @@ -136,29 +136,22 @@ class AppCache(object): """ return self.loaded - def get_app_configs(self, only_installed=True, only_with_models_module=False): + def get_app_configs(self, only_with_models_module=False): """ Return an iterable of application configurations. - If only_installed is True (default), only applications explicitly - listed in INSTALLED_APPS are considered. - If only_with_models_module in True (non-default), only applications containing a models module are considered. """ - if not only_installed: - raise ValueError("only_installed=False isn't supported any more.") self.populate() for app_config in self.app_configs.values(): - if only_installed and not app_config.installed: - continue if only_with_models_module and app_config.models_module is None: continue if self.available_apps is not None and app_config.name not in self.available_apps: continue yield app_config - def get_app_config(self, app_label, only_installed=True, only_with_models_module=False): + def get_app_config(self, app_label, only_with_models_module=False): """ Returns the application configuration for the given app_label. @@ -167,20 +160,13 @@ class AppCache(object): Raises UnavailableApp when set_available_apps() disables the application with this app_label. - If only_installed is True (default), only applications explicitly - listed in INSTALLED_APPS are considered. - If only_with_models_module in True (non-default), only applications containing a models module are considered. """ - if not only_installed: - raise ValueError("only_installed=False isn't supported any more.") self.populate() app_config = self.app_configs.get(app_label) if app_config is None: - raise LookupError("No app with label %r." % app_label) - if only_installed and not app_config.installed: - raise LookupError("App with label %r isn't in INSTALLED_APPS." % app_label) + raise LookupError("No installed app with label %r." % app_label) if only_with_models_module and app_config.models_module is None: raise LookupError("App with label %r doesn't have a models module." % app_label) if self.available_apps is not None and app_config.name not in self.available_apps: |
