#NEWLINE# def for_model( self , model ) : #NEWLINE# #INDENT# '\n        QuerySet for all comments for a particular model (either an instance or\n        a class).\n        ' #NEWLINE# ct = ContentType . objects . get_for_model ( model ) #NEWLINE# qs = self . get_query_set ( ) . filter ( content_type = ct ) #NEWLINE# if isinstance ( model , models . Model ) : #NEWLINE# #INDENT# qs = qs . filter ( object_pk = force_unicode ( model . _get_pk_val ( ) ) ) #NEWLINE# #UNINDENT# return qs