3
0

split templates, add static files (bootstrap 5.1.3)

This commit is contained in:
2022-04-06 20:35:42 +02:00
parent 4d98d825bf
commit 7e15835ebd
9 changed files with 61 additions and 21 deletions

View File

@ -34,6 +34,7 @@ class MyQuartApp(quart_trio.QuartTrio):
def __init__(self, import_name: str, **kwargs) -> None:
self.my_config = capport.config.Config.load_default_once()
kwargs.setdefault('template_folder', os.path.join(os.path.dirname(__file__), 'templates'))
kwargs.setdefault('static_folder', os.path.join(os.path.dirname(__file__), 'static'))
cust_templ = os.path.join('custom', 'templates')
if os.path.exists(cust_templ):
self.custom_loader = jinja2.FileSystemLoader(os.fspath(cust_templ))