Changeset c5be05
- Timestamp:
- 07/22/2008 06:11:49 PM (16 years ago)
- Branches:
- 2.0.x, develop, extjs4-port, master
- Children:
- 498fba
- Parents:
- f42f93
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
deluge/ui/webui/pages.py
rf42f93 rc5be05 391 391 route("/template/static/(.*)", template_static) 392 392 393 class render_static: 394 "render anything in template_dir" 395 @deco.deluge_page 396 def GET(self, name): 397 filename = os.path.join(os.path.dirname(__file__), 398 'templates/%s/static/%s' % (config.get('template'), name)) 399 log.debug("render-static:%s" % filename) 400 return web.template.Template(open(filename).read(), filename=filename)() 401 route("/template/render/(.*)", render_static) 402 403 class template_style: 404 def GET(self): 405 web.header("Content-Type", "text/css") 406 style = Storage() 407 print render.template_style(style) 408 route("/template_style.css", template_style) 409 393 410 class robots: 394 411 def GET(self): … … 397 414 print "User-agent: *\nDisallow:/\n" 398 415 route("/robots.txt", robots) 399 400 class template_style:401 def GET(self):402 web.header("Content-Type", "text/css")403 style = Storage()404 print render.template_style(style)405 route("/template_style.css", template_style)406 416 407 417 class pixmaps:
Note:
See TracChangeset
for help on using the changeset viewer.