I have been working on a Multipage application where each page uses a separate template. Namely the end of my app.py
file looks something like this:
pn.serve({
"":page1,
"last_page":page3,
"content_page":page2,
},static_dirs={'assets': './static/assets','thumbnails':'./static/assets/thumbnails'},
websocket_origin=['*'],port=5506,allow_websocket_origin='localhost:5006')
where each of the page1
,page2
,page3
, functions has a return template.servable()
statement at the end of it.
When deploying the application from the command line using ~$ panel serve app.py --address IPADDRESS --allow-websocket-origin=IPADDRESS:5006
I don’t actually get the pages loading when I visit the page IPADDRESS:5006/app
. What’s more, when I try any of the other addresses (i.e. IPADDRESS:5006/app.content_page
) it simply yields a 404 error.
I am wondering if someone has a better approach?