def get_mdts_for_docrule(self, docrule_id):
        log.debug('Getting MDT-s for document type rule: %s' % docrule_id)
        mdts_list = {}
        self.docrule_id = docrule_id
        # Validating
        if self.mdt_read_call_valid():
            # Getting MDT's from DB
            mdts_view = MetaDataTemplate.view('mdtcouch/docrule', key=docrule_id, include_docs=True)
            # Constructing MDT's response dict
            id = 1
            for row in mdts_view:
                mdts_list[str(id)] = row._doc
                # cleaning up _id and _rev from response to unify response
                mdts_list[str(id)]["mdt_id"] = mdts_list[str(id)]['_id']
                del mdts_list[str(id)]['_id']
                del mdts_list[str(id)]['_rev']
                id+=1
            return mdts_list
        else:
            log.error('Got no mdts for docrule: %s' % docrule_id)
            return False
Get a list of records for a traceback's frame and all lower frames.
dataset/ETHPy150Open adlibre/Adlibre-DMS/adlibre_dms/couchapps/mdt_manager.py/MetaDataTemplateManager.get_mdts_for_docrule--crossover with--dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/inspect.py/getinnerframes