#NEWLINE# @ classmethod #NEWLINE# def add_to_active_filters( cls , filter , key = None ) : #NEWLINE# #INDENT# '\n        Add a new clause to the active filters. A filter may be either\n        a Q object to be applied to the content class or a callable taking\n        a queryset and spitting out a new one.\n\n        If a filter with the given `key` already exists, the new filter\n        replaces the old.\n        ' #NEWLINE# if ( cls . active_filters is None ) : #NEWLINE# #INDENT# cls . active_filters = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# if ( cls is None ) : #NEWLINE# #INDENT# key = filter #NEWLINE# #UNINDENT# cls . active_filters [ key ] = filter