Use base_dir as the project root directory

This commit is contained in:
Sheng
2018-08-18 17:39:50 +08:00
parent d6de1340c4
commit f4197f0e4c
7 changed files with 38 additions and 35 deletions
+3 -3
View File
@@ -28,14 +28,14 @@ define('version', type=bool, help='Show version information',
callback=print_version)
base_dir = os.path.dirname(__file__)
base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
max_body_size = 1 * 1024 * 1024
def get_app_settings(options):
settings = dict(
template_path=os.path.join(base_dir, 'templates'),
static_path=os.path.join(base_dir, 'static'),
template_path=os.path.join(base_dir, 'webssh', 'templates'),
static_path=os.path.join(base_dir, 'webssh', 'static'),
cookie_secret=uuid.uuid4().hex,
websocket_ping_interval=options.wpIntvl,
xsrf_cookies=(not options.debug),