예제 #1
0
    def get(self, daystring=None):
        daystring, day = misc_funcs.validate_date(daystring)

        # Grab the raw data for the date requested
        logging.debug("daystring is '%s'" % (daystring))
        pkg_model = models.DayPackages.get_by_key_name(daystring)
        if not pkg_model:
            self.error(400) # Bad Request
            return None
        pkg_list = pkg_model.unpickle()

        # Render it to a template

        rendered = content.output_page(self, template_file="update.html",
                                       values={
                "packages": pkg_list,
                "date": daystring}
                                       )
        return HeadersAndContent(content=rendered)
예제 #2
0
 def get(self):
     rendered = content.output_page(self, pagename="about")
     return HeadersAndContent(content=rendered)
예제 #3
0
 def get(self):
     content.output_page(self, template_file="admin.html",
                         values={
             "days": ["%02d" % (z + 1) for z in range(31)]
             })