#NEWLINE# @ staticmethod #NEWLINE# def apply_facets( queryset , filters ) : #NEWLINE# #INDENT# '\n        Apply faceting to the queryset\n        ' #NEWLINE# for ( field , options ) in filters [ 'field_facets' ] . items ( ) : #NEWLINE# #INDENT# queryset = queryset . facet ( field , ** options ) #NEWLINE# #UNINDENT# for ( field , options ) in filters [ 'date_facets' ] . items ( ) : #NEWLINE# #INDENT# queryset = queryset . date_facet ( field , ** options ) #NEWLINE# #UNINDENT# return queryset