'Reads a configuration attribute of a resource
@param tablename: the name of the resource DB table
@param key: the key (name) of the attribute'

@classmethod
def get_config(cls, tablename, key, default=None):

    config = current.model.config
    tn = (tablename._tablename if (type(tablename) is Table) else tablename)
    if (tn in config):
        return config[tn].get(key, default)
    else:
        return default
