mirror of https://github.com/huashengdun/webssh
Merge cbd80f26b2
into 1cf19c7186
commit
67107a8918
|
@ -63,3 +63,4 @@ target/
|
||||||
|
|
||||||
# known_hosts file
|
# known_hosts file
|
||||||
known_hosts
|
known_hosts
|
||||||
|
venv/
|
||||||
|
|
|
@ -66,6 +66,12 @@ wssh --logging=debug
|
||||||
# log to file
|
# log to file
|
||||||
wssh --log-file-prefix=main.log
|
wssh --log-file-prefix=main.log
|
||||||
|
|
||||||
|
# specify alternative location for template material
|
||||||
|
wssh --template_path=/templates
|
||||||
|
|
||||||
|
# specify alternative location for static material
|
||||||
|
wssh --static_path=/static
|
||||||
|
|
||||||
# more options
|
# more options
|
||||||
wssh --help
|
wssh --help
|
||||||
```
|
```
|
||||||
|
|
|
@ -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