|
|
@ -25,7 +25,6 @@ CONFIGS = { |
|
|
|
# "DEBUG": True, |
|
|
|
# "DEBUG": True, |
|
|
|
"SECRET_KEY": os.urandom(30), # Set the secret key for session authentication |
|
|
|
"SECRET_KEY": os.urandom(30), # Set the secret key for session authentication |
|
|
|
"PERMANENT_SESSION_LIFETIME": timedelta(minutes=60), |
|
|
|
"PERMANENT_SESSION_LIFETIME": timedelta(minutes=60), |
|
|
|
"PREFERRED_URL_SCHEME" : 'https' |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
SQL_CONFIG = dict( |
|
|
|
SQL_CONFIG = dict( |
|
|
|
database= os.getenv("PGDATABASE"), |
|
|
|
database= os.getenv("PGDATABASE"), |
|
|
@ -51,6 +50,8 @@ role_map = dict(max_sharpe='最大化夏普比率', max_sortino='最大化索提 |
|
|
|
|
|
|
|
|
|
|
|
app = Flask(__name__) |
|
|
|
app = Flask(__name__) |
|
|
|
app.config.from_mapping(CONFIGS) |
|
|
|
app.config.from_mapping(CONFIGS) |
|
|
|
|
|
|
|
app.add_url_rule('/growth.ico', |
|
|
|
|
|
|
|
redirect_to=url_for('static', filename='img/growth.ico')) |
|
|
|
|
|
|
|
|
|
|
|
# Load Assets |
|
|
|
# Load Assets |
|
|
|
with open('assets_tw.json') as f: |
|
|
|
with open('assets_tw.json') as f: |
|
|
|