Allura/allura/model/project.py
def accolades_index(cls, projects):
        '''Return a dict[project_id] = list of accolades, efficiently'''
        from .artifact import AwardGrant
        result = dict((p._id, []) for p in projects)
        for award in AwardGrant.query.find(dict(
                granted_to_project_id={'$in': result.keys()})):
            result[award.granted_to_project_id].append(award)
        return result
Return a dict[project_id] = list of accolades, efficiently
Return a dict[project_id] = list of accolades, efficiently
Return a dict [ project_id ] = list of accolades efficiently
def accolades_index(cls, projects):
        from .artifact import AwardGrant
        result = dict((p._id, []) for p in projects)
        for award in AwardGrant.query.find(dict(
                granted_to_project_id={'$in': result.keys()})):
            result[award.granted_to_project_id].append(award)
        return result
def accolades_index ( cls , projects ) : from . artifact import AwardGrant result = dict ( ( p . _id , [ ] ) for p in projects ) for award in AwardGrant . query . find ( dict ( granted_to_project_id = { '$in' : result . keys ( ) } ) ) : result [ award . granted_to_project_id ] . append ( award ) return result
Return a dict[project_id] = list of accolades, efficiently
Return a dict [ project_id ] = list of accolades efficiently
'''Return a dict[project_id] = list of accolades, efficiently'''
cls
projects