# HG changeset patch # User Peter Sanchez # Date 1293760073 28800 # Thu Dec 30 17:47:53 2010 -0800 # Node ID c991b667ed57f4e52807cd29799b399e20d68392 # Parent be72082c589780691d3c3829866e293526e81682 Added ability to pass variables to EasyConfig.get_object diff --git a/easyconfig/__init__.py b/easyconfig/__init__.py --- a/easyconfig/__init__.py +++ b/easyconfig/__init__.py @@ -40,13 +40,13 @@ return getattr(settings, self.setting_name, self.default_module) - def get_object(self, method, default_obj): + def get_object(self, method, default_obj, *args, **kwargs): ''' Check that the support config is custom, and if so, that the right methods exist. If not, return the default_obj ''' if self._get_config_name() != self.default_module: config = self._get_config() if hasattr(config, method): - return getattr(config, method)() + return getattr(config, method)(*args, **kwargs) return default_obj