Only inject assets on table page

This commit is contained in:
Simon Willison 2020-09-03 19:34:40 -07:00
commit 04b904add3

View file

@ -20,10 +20,12 @@ def cached_filepaths_for_extension(extension):
@hookimpl
def extra_css_urls():
return cached_filepaths_for_extension('css')
def extra_css_urls(view_name):
if view_name == "table":
return cached_filepaths_for_extension('css')
@hookimpl
def extra_js_urls():
return cached_filepaths_for_extension('js')
def extra_js_urls(view_name):
if view_name == "table":
return cached_filepaths_for_extension('js')