<s> from django . conf import settings <EOL> def get_server_loc ( ) : <EOL> if hasattr ( settings , '<STR_LIT>' ) : <EOL> address , port = settings . TASKFORCE_SERVER . split ( '<STR_LIT::>' ) <EOL> port = int ( port ) <EOL> else : <EOL> address = '<STR_LIT:127.0.0.1>' <EOL> port = <NUM_LIT> <EOL> return address , port <EOL> def get_server_base_uri ( ) : <EOL> address , port = get_server_loc ( ) <EOL> return "<STR_LIT>" % ( address , port ) </s>
