28 lines
865 B
Python
28 lines
865 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
class Environment():
|
|
|
|
def __init__(self, host, port, dbname, username, pwd, admin_pw=False, basic_auth=False):
|
|
self.admin_pw = admin_pw
|
|
self.dbname = dbname
|
|
self.username = username
|
|
self.pwd = pwd
|
|
self.port = port
|
|
self.host = host
|
|
self.lang = 'de_DE'
|
|
self.basic_auth = basic_auth or ('user', 'pass') # HTTP authentification
|
|
|
|
def __str__(self):
|
|
return """==============================
|
|
Host: %s
|
|
User: %s
|
|
DB: %s
|
|
Port: %s
|
|
==============================""" % (self.host, self.username, self.dbname, self.port)
|
|
|
|
|
|
ENVIRONMENTS = {
|
|
'br': Environment('http://localhost', '8070', 'test13', 'admin', 'x', 'admin'),
|
|
'br2': Environment('http://localhost', '8000', 'screenplane_1', 'admin', 'x', 'admin'),
|
|
}
|
|
|