From 529fb4f6c778010bdf1ef672a4e00d70813c6fc7 Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Fri, 6 May 2022 12:24:05 +0200 Subject: [PATCH] Allow providing --index for directory style apps --- panel/command/serve.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/panel/command/serve.py b/panel/command/serve.py index d9fd35c157..4d12564599 100644 --- a/panel/command/serve.py +++ b/panel/command/serve.py @@ -237,6 +237,12 @@ def customize_kwargs(self, args, server_kwargs): index = args.index if args.index.endswith(ext) else f'{args.index}{ext}' if any(f.endswith(index) for f in files): found = True + # Check for directory style applications + for f in files: + if '.' in os.path.basename(f): # Skip files with extension + continue + if args.index == os.path.basename(f) or args.index == f: + found = True if not found: raise ValueError( "The --index argument must either specify a jinja2 "