Example #1
0
 def get(self, request):
     """The home page of this router"""
     ul = Html("ul")
     for router in sorted(self.routes, key=lambda r: r.creation_count):
         a = router.link(escape(router.route.path))
         li = Html("li", a, " %s" % router.parameters.get("title", ""))
         ul.append(li)
     title = "Pulsar HttpBin"
     html = request.html_document
     html.head.title = title
     html.head.links.append("/media/httpbin.css")
     html.head.scripts.append("//code.jquery.com/jquery.min.js")
     html.head.scripts.append("/media/httpbin.js")
     ul = ul.render(request)
     body = template() % (title, version, ul, pyversion, JAPANESE)
     html.body.append(body)
     return html.http_response(request)
Example #2
0
 def get(self, request):
     '''The home page of this router'''
     ul = Html('ul')
     for router in sorted(self.routes, key=lambda r: r.creation_count):
         a = router.link(escape(router.route.path))
         li = Html('li', a, ' %s' % router.parameters.get('title', ''))
         ul.append(li)
     title = 'Pulsar HttpBin'
     html = request.html_document
     html.head.title = title
     html.head.links.append('/media/httpbin.css')
     html.head.scripts.append('//code.jquery.com/jquery.min.js')
     html.head.scripts.append('/media/httpbin.js')
     ul = ul.render(request)
     body = template() % (title, version, ul, pyversion, JAPANESE)
     html.body.append(body)
     return html.http_response(request)
Example #3
0
 def get(self, request):
     '''The home page of this router'''
     ul = Html('ul')
     for router in sorted(self.routes, key=lambda r: r.creation_count):
         a = router.link(escape(router.route.path))
         li = Html('li', a, ' %s' % router.parameters.get('title', ''))
         ul.append(li)
     title = 'Pulsar HttpBin'
     html = request.html_document
     html.head.title = title
     html.head.links.append('/media/httpbin.css')
     html.head.scripts.append('//code.jquery.com/jquery.min.js')
     html.head.scripts.append('/media/httpbin.js')
     ul = ul.render(request)
     body = template() % (title, version, ul, pyversion, JAPANESE)
     html.body.append(body)
     #html.meta.append()
     return html.http_response(request)
Example #4
0
 def get(self, request):
     '''The home page of this router'''
     ul = Html('ul')
     for router in sorted(self.routes, key=lambda r: r.creation_count):
         a = router.link(escape(router.route.path))
         a.addClass(router.name)
         for method in METHODS:
             if router.getparam(method):
                 a.addClass(method)
         li = Html('li', a, ' %s' % router.getparam('title', ''))
         ul.append(li)
     title = 'Pulsar'
     html = request.html_document
     html.head.title = title
     html.head.links.append('httpbin.css')
     html.head.links.append('favicon.ico', rel="icon", type='image/x-icon')
     html.head.scripts.append('httpbin.js')
     ul = ul.render(request)
     templ, _, _ = asset('template.html')
     body = templ % (title, JAPANESE, CHINESE, version, pyversion, ul)
     html.body.append(body)
     return html.http_response(request)
Example #5
0
 def get(self, request):
     '''The home page of this router'''
     ul = Html('ul')
     for router in sorted(self.routes, key=lambda r: r.creation_count):
         a = router.link(escape(router.route.path))
         a.addClass(router.name)
         for method in METHODS:
             if router.getparam(method):
                 a.addClass(method)
         li = Html('li', a, ' %s' % router.getparam('title', ''))
         ul.append(li)
     title = 'Pulsar'
     html = request.html_document
     html.head.title = title
     html.head.links.append('httpbin.css')
     html.head.links.append('favicon.ico', rel="icon", type='image/x-icon')
     html.head.scripts.append('httpbin.js')
     ul = ul.render(request)
     templ, _, _ = asset('template.html')
     body = templ % (title, JAPANESE, CHINESE, version, pyversion, ul)
     html.body.append(body)
     return html.http_response(request)
Example #6
0
 def get(self, request):
     """The home page of this router"""
     ul = Html("ul")
     for router in sorted(self.routes, key=lambda r: r.creation_count):
         a = router.link(escape(router.route.path))
         a.addClass(router.name)
         for method in METHODS:
             if router.getparam(method):
                 a.addClass(method)
         li = Html("li", a, " %s" % router.getparam("title", ""))
         ul.append(li)
     title = "Pulsar"
     html = request.html_document
     html.head.title = title
     html.head.links.append("httpbin.css")
     html.head.links.append("favicon.ico", rel="icon", type="image/x-icon")
     html.head.scripts.append("httpbin.js")
     ul = ul.render(request)
     templ = asset("template.html")
     body = templ % (title, JAPANESE, CHINESE, version, pyversion, ul)
     html.body.append(body)
     return html.http_response(request)