Reputation: 6147
I've created a project and I'm attempting to load a static CSS for the styling of the webpage. However No matter what I do it does not appear to load. It gives me an internal 500 error. The docs are rather limiting on explaining how it works and how to setup it up. They just show a screeshot of the folder structure.
I tried using this but no luck, and I'm not entirely sure if i even need it, the docs don't really say.
{% include './static/css/custom.css'%}
Here is my setup.
myapp
+---main.py
+---static
| +---css
| | +---special.css
|
|---templates
| +---index.html
|
+---theme.yaml
However here is my index.html file
<!DOCTYPE html>
<html lang="en">
{% block head %}
<head>
{% block inner_head %}
<meta charset="utf-8">
<title>{% block title %}{{ title | e if title else "Bokeh Plot" }}{% endblock %}</title>
{% block preamble %}{% endblock %}
{% block resources %}
{% block js_resources %}
{{ bokeh_css | indent(8) if bokeh_css }}
{% endblock %}
{% block css_resources %}
{{ bokeh_js | indent(8) if bokeh_js }}
{% endblock %}
{% endblock %}
{% block postamble %}{% endblock %}
{% endblock %}
</head>
{% endblock %}
{% block body %}
<body>
<h1>MY MAP</h1>
{% block inner_body %}
{% block contents %}
{% for doc in docs %}
{{ embed(doc) if doc.elementid }}
{% for root in doc.roots %}
{{ embed(root) | indent(10) }}
{% endfor %}
{% endfor %}
{% endblock %}
{{ plot_div | indent(8) }}
{{ plot_script | indent(8) }}
{% endblock %}
</body>
{% endblock %}
</html>
Upvotes: 0
Views: 645
Reputation: 3364
You need to specify the full path from the application directory. So if the application folder is called myapp, the include statement should be:
{% include 'myapp/static/css/custom.css'%}
Upvotes: 1