You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to create a custom BasicTemplate based on the Fast Framework. For now it should be a part of the awesome-panel-extensions package. It's been setup as a package of prebuilt bokeh extensions as described here.
Unfortunately this is not possible without hacks and workarounds as the bundling of the css and jsresources of the BasicTemplate only works for BasicTemplate in the Panel project.
This works
I have
copied the ReactTemplate files to the folder awesome_panel_extensions\frameworks\fast\templates\fast\
changed the relative imports to absolute panel imports
and tested that it works.
This does not work
But as soon as I rename ReactTemplate to FastTemplate it no longer works.
In the hope that it would magically bundle my resources and serve them. It did not work and inspecting the code I can see that it only supports bundling resources from the Panel project.
FYI: you can get around this issue by adding a static dir with the same directory structure as the templates use and overriding the _template_resources method:
@philippjfr This sounds like a reasonable request but I'm not sure about its priority. I've assigned it to the the 'next' milestone but feel free to bump it as appropriate.
@jlstevens , @philippjfr . I think finishing #1730 before this one would make sense. Loading indicators will be simple to use for a lot of users. This request is important. But not the first step for a lot of users.
I would like to create a custom BasicTemplate based on the Fast Framework. For now it should be a part of the awesome-panel-extensions package. It's been setup as a package of prebuilt bokeh extensions as described here.
Unfortunately this is not possible without hacks and workarounds as the bundling of the
css
andjs
resources
of the BasicTemplate only works for BasicTemplate in the Panel project.This works
I have
awesome_panel_extensions\frameworks\fast\templates\fast\
and tested that it works.
This does not work
But as soon as I rename
ReactTemplate
toFastTemplate
it no longer works.Attempts to Fix
I ran
In the hope that it would magically bundle my resources and serve them. It did not work and inspecting the code I can see that it only supports bundling resources from the Panel project.
Reproducible Steps
You can reproduce the issue via
and you will see among other
$ python -m panel serve 'awesome_panel_extensions/frameworks/fast/templates/test_fast.py' --dev 2020-11-15 05:51:11,318 Starting Bokeh server version 2.2.3 (running on Tornado 6.1) 2020-11-15 05:51:11,320 User authentication hooks NOT provided (default user enabled) 2020-11-15 05:51:11,323 Bokeh app running at: http://localhost:5006/test_fast 2020-11-15 05:51:11,323 Starting Bokeh server with process id: 7584 2020-11-15 05:51:18,932 404 GET /static/extensions/panel/bundled/fasttemplate/bootstrap/3.3.7/css/bootstrap.min.css (::1) 1.00ms 2020-11-15 05:51:18,935 404 GET /static/extensions/panel/bundled/fasttemplate/react.css (::1) 2.00ms 2020-11-15 05:51:18,935 404 GET /static/extensions/panel/bundled/fasttemplate/default.css (::1) 2.00ms 2020-11-15 05:51:18,936 404 GET /static/extensions/panel/bundled/fasttemplate/react@16/umd/react.development.js (::1) 2.50ms 2020-11-15 05:51:18,937 404 GET /static/extensions/panel/bundled/fasttemplate/react-dom@16/umd/react-dom.development.js (::1) 3.00ms 2020-11-15 05:51:18,938 404 GET /static/extensions/panel/bundled/fasttemplate/font-awesome/4.7.0/css/font-awesome.min.css (::1) 3.50ms 2020-11-15 05:51:18,939 404 GET /static/extensions/panel/bundled/fasttemplate/babel-standalone@latest/babel.min.js (::1) 1.50ms 2020-11-15 05:51:18,941 404 GET /static/extensions/panel/bundled/fasttemplate/ajax/libs/react-grid-layout/1.1.1/react-grid-layout.min.js (::1) 1.50ms 2020-11-15 05:51:19,226 404 GET /static/extensions/panel/bundled/fasttemplate/react-dom@16/umd/react-dom.development.js (::1) 1.00ms 2020-11-15 05:51:19,239 404 GET /static/extensions/panel/bundled/fasttemplate/babel-standalone@latest/babel.min.js (::1) 0.50ms 2020-11-15 05:51:19,242 404 GET /static/extensions/panel/bundled/fasttemplate/ajax/libs/react-grid-layout/1.1.1/react-grid-layout.min.js (::1) 0.50ms
The text was updated successfully, but these errors were encountered: