Removed unused title templating

This commit is contained in:
Nick Steel 2015-04-26 00:46:16 +01:00
parent 1c35ceec7e
commit 5b7880936f
2 changed files with 1 additions and 9 deletions

View File

@ -10,7 +10,6 @@
//configuration
var isMusicBox = {{musicbox}}; // Remove MusicBox only content (e.g. settings, system pages)
var websocketUrl = '{{websocket_url}}'
//{{title}}
$(document).bind("mobileinit", function () {
$.extend($.mobile, {

View File

@ -48,16 +48,9 @@ class IndexHandler(tornado.web.RequestHandler):
'websocket_url': ws_url
}
self.__path = path
self.__title = string.Template('MusicBox on $hostname')
def get(self, path):
return self.render('index.html', title=self.get_title(), **self.__dict)
def get_title(self):
hostname, sep, port = self.request.host.rpartition(':')
if not sep or not port.isdigit():
hostname, port = self.request.host, '80'
return self.__title.safe_substitute(hostname=hostname, port=port)
return self.render('index.html', **self.__dict)
def get_template_path(self):
return self.__path