#NEWLINE# @ classmethod #NEWLINE# def by_domain( cls , domain , active_only = True ) : #NEWLINE# #INDENT# filters = { #NEWLINE# #INDENT# 'domain' : domain , #NEWLINE# #UNINDENT# } #NEWLINE# if active_only : #NEWLINE# #INDENT# filters [ 'active' ] = True #NEWLINE# #UNINDENT# return AutomaticUpdateRule . objects . filter ( deleted = False , ** filters )