#NEWLINE# def get_valid_shipping_methods( request , product = None ) : #NEWLINE# #INDENT# 'Returns a list of all valid shipping methods for the passed request.\n    ' #NEWLINE# result = [ ] #NEWLINE# for sm in ShippingMethod . objects . filter ( active = True ) : #NEWLINE# #INDENT# if sm . is_valid ( request , product ) : #NEWLINE# #INDENT# result . append ( sm ) #NEWLINE# #UNINDENT# #UNINDENT# return sm