CSS, JS not loading in templates

Skip to first unread message

Sunando Samaddar

Jan 4, 2020, 11:58:35 AM1/4/20
to Mako Templates for Python
I don't know if this is the best group for this type of question, but since I'll want to use Mako eventually in my app I'm giving it a try. In short, in my present app the CSS and JS files in the templates are not loading at all (DevTools shows Could not find the original style sheet., I don't know what to do), also I do not have any template syntax in my html yet. If the following can help debug, it would be great. 

`dev_appserver.py .` (from project folder) logs tail
INFO     2020-01-04 15:02:33,919 module.py:861] default: "GET / HTTP/1.1" 200 8813
INFO     2020-01-04 15:02:34,089 module.py:861] default: "GET /client/lib/mdl/material.min.css HTTP/1.1" 404 154
INFO     2020-01-04 15:02:34,098 module.py:861] default: "GET /client/lib/mdl/material.min.js HTTP/1.1" 404 154
INFO     2020-01-04 15:02:34,107 module.py:861] default: "GET /client/lib/mdl/styles.css HTTP/1.1" 404 154

application: helloworld
version: 1
runtime: python27
api_version: 1
threadsafe: true

- url: /.*
script: main.app

- url: /client/lib/mdl
static_dir: client/lib/mdl

- url: /client/images
static_dir: client/images

Jonathan Vanasco

Jan 8, 2020, 11:22:58 AM1/8/20
to Mako Templates for Python
This looks to be a problem with your application's configuration and how your html is referencing the included files, and not related to Mako.  You should ask this question in a group tailored to your application's framework or StackOverflow, with information on recreating this issue.  Someone there may be able to help you.
Reply all
Reply to author
0 new messages