def render(self, context):
        try:
            item = self.key_item.resolve(context)
            dict = self.keys_dict.resolve(context)
            value = dict[item]
            # Special rendering for 'date' variable in search
            if item == u'date':
                date = dict[u'date']
                if u'end_date' in dict:
                    end_date = dict[u'end_date']
                    item = u'Indexing Date: (from: ' + unicode(date) + u' to: ' + unicode(end_date) + u')'
                    return item
                else:
                    # Normal rendering for indexes
                    item = u'Indexing Date'
            if item == u'description':
                item = u'Description'
            if item == u'docrule_id':
                item = u'Document Type'
                id = value
                dman = DocumentTypeRuleManager()
                docrule = dman.get_docrule_by_id(id)
                value = docrule.get_title()
            if not value.__class__.__name__ == 'tuple':
                resp_string = unicode(item) + u': ' + unicode(value)
            else:
                resp_string = unicode(item) + u': (from: ' + unicode(value[0]) + u' to: ' + unicode(value[1]) + u')'
            return resp_string
        except template.VariableDoesNotExist:
            return ''
dataset/ETHPy150Open adlibre/Adlibre-DMS/adlibre_dms/apps/mdtui/templatetags/index_keys.py/ProvideLiElement.render/original