mirror of https://github.com/huashengdun/webssh
Added the following arguments:
--template_path: Specify the location of template material at runtime --static_path: Specify the location of static material at runtimepull/177/head
parent
51d527fe75
commit
47e6b55753
|
@ -63,3 +63,4 @@ target/
|
||||||
|
|
||||||
# known_hosts file
|
# known_hosts file
|
||||||
known_hosts
|
known_hosts
|
||||||
|
venv/
|
||||||
|
|
|
@ -54,9 +54,12 @@ Example: --encoding='utf-8' to solve the problem with some switches&routers''')
|
||||||
define('version', type=bool, help='Show version information',
|
define('version', type=bool, help='Show version information',
|
||||||
callback=print_version)
|
callback=print_version)
|
||||||
|
|
||||||
|
|
||||||
base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
font_dirs = ['webssh', 'static', 'css', 'fonts']
|
font_dirs = ['webssh', 'static', 'css', 'fonts']
|
||||||
|
|
||||||
|
define('template_path', default=os.path.join(base_dir, 'webssh', 'templates'))
|
||||||
|
define('static_path', default=os.path.join(base_dir, 'webssh', 'static'))
|
||||||
|
|
||||||
max_body_size = 1 * 1024 * 1024
|
max_body_size = 1 * 1024 * 1024
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,8 +78,8 @@ class Font(object):
|
||||||
|
|
||||||
def get_app_settings(options):
|
def get_app_settings(options):
|
||||||
settings = dict(
|
settings = dict(
|
||||||
template_path=os.path.join(base_dir, 'webssh', 'templates'),
|
template_path=options.template_path,
|
||||||
static_path=os.path.join(base_dir, 'webssh', 'static'),
|
static_path=options.static_path,
|
||||||
websocket_ping_interval=options.wpintvl,
|
websocket_ping_interval=options.wpintvl,
|
||||||
debug=options.debug,
|
debug=options.debug,
|
||||||
xsrf_cookies=options.xsrf,
|
xsrf_cookies=options.xsrf,
|
||||||
|
|
Loading…
Reference in New Issue