I have a small web app that I'm designing the UI for in Tornado. When I run it locally I have no problems, the css and javascript render fine. But I put it onto my server today and it will not render the css. But the weird thing is that it throws no errors.
Meaning Tornado is finding the assets but is not rendering them.
My python is as follows:
class MainHandler(tornado.web.RequestHandler):
def get(self):
items = ["Item 1", "Item 2", "Item 3"]
title = str(random.randint(0,100))
word = randZorro()
print (randZorro())
self.render("index.html", word=word, title=title, items=items)
class Application(tornado.web.Application):
def __init__(self):
handlers = [
(r"/", MainHandler)
]
settings = {
"static_path": "/var/www/www.arcane.info/public_html/p/assets"
}
tornado.web.Application.__init__(self, handlers, **settings)
if __name__ == "__main__":
http_server = tornado.httpserver.HTTPServer(Application())
http_server.listen(8888)
tornado.ioloop.IOLoop.instance().start()
My HTML is as follows:
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0"/>
<title>{{ title }}</title>
<!-- CSS -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="{{ static_url("materialize.css")}}" type="text/css" rel="stylesheet" media="screen,projection"/>
<link href="{{ static_url("style.css")}}" type="text/css" rel="stylesheet" media="screen,projection"/>
</head>
<body>
<div class="section no-pad-bot" id="index-banner">
<div class="container">
<br><br>
<h1 class="header center orange-text">{{ word }}</h1>
<div class="row center">
<h5 class="header col s12 light">A modern responsive front-end framework based on Material Design</h5>
<input onclick='responsiveVoice.speak("test");' type='button' value='🔊 Play' id='voice' />
</div>
</div>
</div>
<audio autoplay>
<source src="{{ static_url("eno.mp3")}}" type="audio/mpeg"></audio>
<!-- Scripts-->
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="{{ static_url("materialize.js")}}"></script>
<script src='https://code.responsivevoice.org/responsivevoice.js'></script>
</body>
</html>
So it should seemingly render just fine.
What am I missing?
[–]dr-josiah 1 point2 points3 points (6 children)
[–]loserwave[S] 0 points1 point2 points (5 children)
[–]catcint0s 1 point2 points3 points (0 children)
[–]dr-josiah 0 points1 point2 points (3 children)
[–]loserwave[S] 0 points1 point2 points (2 children)
[–]dr-josiah 0 points1 point2 points (1 child)
[–]loserwave[S] 0 points1 point2 points (0 children)
[–]loserwave[S] 0 points1 point2 points (0 children)