<s> from storages . backends . s3boto import S3BotoStorage <EOL> from furl import furl <EOL> class BaseS3Storage ( S3BotoStorage ) : <EOL> def url ( self , name ) : <EOL> url = super ( BaseS3Storage , self ) . url ( name ) <EOL> if not self . querystring_auth : <EOL> f = furl ( url ) <EOL> if '<STR_LIT>' in f . args : <EOL> del f . args [ '<STR_LIT>' ] <EOL> url = f . url <EOL> return url <EOL> class StaticS3Storage ( BaseS3Storage ) : <EOL> location = '<STR_LIT>' <EOL> def url ( self , name ) : <EOL> url = super ( StaticS3Storage , self ) . url ( name ) <EOL> if name . endswith ( '<STR_LIT:/>' ) and not url . endswith ( '<STR_LIT:/>' ) : <EOL> url += '<STR_LIT:/>' <EOL> return url <EOL> class S3Storage ( BaseS3Storage ) : <EOL> pass </s>
