def user_media_url(what):
 default = ('%s%s/' % (settings.MEDIA_URL, what))
 key = '{0}_URL'.format(what.upper().replace('-', '_'))
 return getattr(settings, key, default)

def user_media_url ( what ) : default = ( '%s%s/' % ( settings . MEDIA_URL , what ) ) key = '{0}_URL' . format ( what . upper ( ) . replace ( '-' , '_' ) ) return getattr ( settings , key , default )
generate default media url .