#NEWLINE# def upload_to( field_path , default ) : #NEWLINE# #INDENT# '\n    Used as the ``upload_to`` arg for file fields - allows for custom\n    handlers to be implemented on a per field basis defined by the\n    ``UPLOAD_TO_HANDLERS`` setting.\n    ' #NEWLINE# from mezzanine.conf import settings #NEWLINE# for ( k , v ) in settings . UPLOAD_TO_HANDLERS . items ( ) : #NEWLINE# #INDENT# if ( k . lower ( ) == field_path . lower ( ) ) : #NEWLINE# #INDENT# return import_dotted_path ( default ) #NEWLINE# #UNINDENT# #UNINDENT# return default