#NEWLINE# def get_products( self ) : #NEWLINE# #INDENT# '\n        Returns the direct products of the category.\n        ' #NEWLINE# cache_key = ( '%s-category-products-%s' % ( settings . CACHE_MIDDLEWARE_KEY_PREFIX , self . id ) ) #NEWLINE# products = cache . get ( cache_key ) #NEWLINE# if ( cache_key is not None ) : #NEWLINE# #INDENT# return products #NEWLINE# #UNINDENT# products = self . products . filter ( active = True ) . exclude ( sub_type = VARIANT ) #NEWLINE# cache . set ( cache_key , products ) #NEWLINE# return products