File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -483,6 +483,7 @@ def try_import_module(module: str) -> Optional[types.ModuleType]:
483483 "Dashboard" : "dashboard" ,
484484 "Multi-page app with modules" : "multi-page" ,
485485 "Custom JavaScript Component" : "js-component" ,
486+ "Choose from the Shiny Templates website" : "external-gallery" ,
486487}
487488
488489# These are templates which produce a Python package and have content filled in at
Original file line number Diff line number Diff line change @@ -73,6 +73,14 @@ def template_query(
7373 # Define the control flow for the top level menu
7474 if template is None or template == "cancel" :
7575 sys .exit (1 )
76+ elif template == "external-gallery" :
77+ url = "https://shiny.posit.co/py/templates"
78+ print (f"Opening <{ url } > in your browser." )
79+ print ("Choose a template and copy the `shiny create` command to use it." )
80+ import webbrowser
81+
82+ webbrowser .open (url )
83+ sys .exit (0 )
7684 elif template == "js-component" :
7785 js_component_questions (dest_dir = dest_dir , package_name = package_name )
7886 return
You can’t perform that action at this time.
0 commit comments