示例#1
0
 def get(self):
     util.save_url(self.request, self.response)
     util.fill_app_attrs(self.app, self.request.uri)
     user_agent = self.request.headers['User-Agent']
     view = self.view.type
     self.view.device = device.get_device(user_agent, view)
     self.response.out.write(util.render_template(self.app, self.view))
示例#2
0
 def get(self):
     util.save_url(self.request, self.response)
     util.fill_app_attrs(self.app, self.request.uri)
     label = self.request.get("label", default_value=None)
     page = int(self.request.get("page", default_value="1"))
     if page > 0:
         self.fill_view_attrs(label, page)
         self.response.out.write(util.render_template(self.app, self.view))
     else:
         self.view = info.MetaInfoView()
         self.fill_metainfo(label)
         self.response.out.write(util.render_template(self.app, self.view))
示例#3
0
    def get(self):
        util.save_url(self.request, self.response)
        util.fill_app_attrs(self.app, self.request.uri)
        user_agent = self.request.headers['User-Agent']
        view = self.view.type
        self.view.device = device.get_device(user_agent, view)

        status_code = 400
        self.response.set_status(status_code)

        request_pattern = re.compile('https?://[^/]+(/.*)')
        params = request_pattern.match(self.request.uri).group(1)

        self.view.status_code = status_code
        self.view.message = webapp.Response.http_status_message(status_code)
        self.view.content = params

        self.response.out.write(util.render_template(self.app, self.view))
示例#4
0
 def get(self):
     util.save_url(self.request, self.response)
     util.fill_app_attrs(self.app, self.request.uri)
     self.fill_view_attrs(self.request.get("id", default_value="0"))
     self.response.out.write(util.render_template(self.app, self.view))