#NEWLINE# def __init__( self , location = None , base_url = None , fallback_url = None , fallback_domain = None ) : #NEWLINE# #INDENT# self . fallback_url = ( fallback_url or getattr ( settings , 'LOCALDEVSTORAGE_HTTP_FALLBACK_URL' , None ) ) #NEWLINE# if self . fallback_url : #NEWLINE# #INDENT# warnings . warn ( 'fallback_url and LOCALDEVSTORAGE_HTTP_FALLBACK_URL have been replaced by fallback_domain and LOCALDEVSTORAGE_HTTP_FALLBACK_DOMAIN, respectively, and will be removed in a future release.' ) #NEWLINE# #UNINDENT# self . fallback_domain = ( fallback_domain or getattr ( settings , 'LOCALDEVSTORAGE_HTTP_FALLBACK_DOMAIN' , None ) ) #NEWLINE# if ( not ( self . fallback_url or self . fallback_domain ) ) : #NEWLINE# #INDENT# raise ImproperlyConfigured ( 'please define LOCALDEVSTORAGE_HTTP_FALLBACK_DOMAIN in your settings' ) #NEWLINE# #UNINDENT# self . session = requests . Session ( ) #NEWLINE# username = getattr ( settings , 'LOCALDEVSTORAGE_HTTP_PASSWORD' , None ) #NEWLINE# password = getattr ( settings , 'LOCALDEVSTORAGE_HTTP_USERNAME' , None ) #NEWLINE# if ( username and password ) : #NEWLINE# #INDENT# self . session . auth = ( username , password ) #NEWLINE# #UNINDENT# super ( BaseStorage , self ) . __init__ ( location , base_url )