#NEWLINE# def filter_label( self , queryset , value ) : #NEWLINE# #INDENT# if ( ':' in value ) : #NEWLINE# #INDENT# ( k , v ) = value . split ( ':' ) #NEWLINE# v = ( v if v else None ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ( k , v ) = ( value , None ) #NEWLINE# #UNINDENT# if ( v is None ) : #NEWLINE# #INDENT# return queryset . filter ( labels__key = k ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return queryset . filter ( labels__key = queryset , labels__value = v )