[gen] Changed the way to customize the Config in an app.

This commit is contained in:
Gaetan Delannay 2013-07-24 15:53:19 +02:00
parent 88bd5e5bce
commit 8833f7b0ae
12 changed files with 182 additions and 160 deletions

View file

@ -1646,9 +1646,12 @@ class BaseMixin:
'''Returns the application tool.'''
return self.getPhysicalRoot().config
def getProductConfig(self):
'''Returns a reference to the config module.'''
return self.__class__.config
def getProductConfig(self, app=False):
'''Returns a reference to the config module. If p_app is True, it
returns the application config.'''
res = self.__class__.config
if app: res = res.appConfig
return res
def getParent(self):
'''If this object is stored within another one, this method returns it.