hm352
August 2, 2018, 10:52am
1
Attempting to load a basic html navbar to the top of all of my web pages,
I’ve added an
app.index_string = ““some html””
in to my my Index.py, but nothing comes up however the defined layouts in apps still display.
file structure
dash_app
├── app.py
├── apps
│ ├── home_page.py
│ ├── page1.py
│ ├── page2.py
│ ├── init .py
├── index.py
├── requirements.txt
└── static|── base.css
hm352
August 2, 2018, 2:40pm
2
app.py
import dash
import os
from flask import send_from_directory
app = dash.Dash()
server = app.server
app.config.suppress_callback_exceptions = True
app.scripts.config.serve_locally = True
external_css = [
‘/static/base.css’,
]
for css in external_css:
app.css.append_css({“external_url”: css})
@app.server.route (’/static/path:path ’)
def static_file(path):
static_folder = os.path.join(os.getcwd(), ‘static’)
return send_from_directory(static_folder, path)
Can we see the index_string
?
1 Like