#NEWLINE# def allow( self , comment , content_object ) : #NEWLINE# #INDENT# '\n        Determine whether a given comment is allowed to be posted on\n        a given object.\n        \n        Return ``True`` if the comment should be allowed, ``False\n        otherwise.\n        \n        ' #NEWLINE# if self . enable_field : #NEWLINE# #INDENT# if ( not getattr ( content_object , self . enable_field ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# #UNINDENT# if ( self . auto_close_field and self . close_after ) : #NEWLINE# #INDENT# if ( self . _get_delta ( datetime . datetime . now ( ) , getattr ( content_object , self . auto_close_field ) ) . days >= self . close_after ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# #UNINDENT# return True