mirror of http://localhost:9400/cloud/cms
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
126 lines
3.6 KiB
Python
126 lines
3.6 KiB
Python
2 years ago
|
__doc__ = """
|
||
|
arguments :
|
||
|
--config path of the configuration otherwise it will look for the default in the working directory
|
||
|
"""
|
||
|
from flask import Flask,render_template,send_from_directory,request
|
||
|
import flask
|
||
|
import transport
|
||
|
from transport import providers
|
||
|
import cms
|
||
|
import sys
|
||
|
import os
|
||
|
import json
|
||
|
import copy
|
||
|
|
||
|
from jinja2 import Environment, BaseLoader
|
||
|
|
||
|
|
||
|
|
||
|
_app = Flask(__name__)
|
||
|
@_app.route('/favicon.ico')
|
||
|
def favicon():
|
||
|
return send_from_directory(os.path.join(_app.root_path, 'static/img'),
|
||
|
'vanderbilt-logo.png', mimetype='image/vnd.microsoft.icon')
|
||
|
|
||
|
@_app.route("/")
|
||
|
def _index ():
|
||
|
global _config
|
||
2 years ago
|
if sys.argv[i].startswith('--'):
|
||
|
key = sys.argv[i][2:] #.replace('-','')
|
||
|
SYS_ARGS[key] = 1
|
||
|
if i + 1 < N:
|
||
|
value = sys.argv[i + 1] = sys.argv[i+1].strip()
|
||
|
if key and value and not value.startswith('--'):
|
||
|
SYS_ARGS[key] = value
|
||
|
|
||
|
|
||
|
|
||
|
i += 2
|
||
|
if __name__ == '__main__' :
|
||
|
|