Peter Sanchez  committed c991b66

Added ability to pass variables to EasyConfig.get_object

  • Participants
  • Parent commits be72082

Comments (0)

Files changed (1)

File easyconfig/

         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