#NEWLINE# def user_media_url( what ) : #NEWLINE# #INDENT# '\n    Generate default media url, and make possible to override it from\n    settings.\n    ' #NEWLINE# default = ( '%s%s/' % ( settings . MEDIA_URL , default ) ) #NEWLINE# key = '{0}_URL' . format ( what . upper ( ) . replace ( '-' , '_' ) ) #NEWLINE# return getattr ( settings , key , default )