示例#1
0
  def render_form(self, collection=None):
    context = simpleTALES.Context(allowPythonPath=True)

    context.addGlobal("title", "Manage Survival KIT Orders")
    context.addGlobal("root", '/manage/')
    context.addGlobal("orders", Order.uncollected())
    context.addGlobal("download", collection)
    context.addGlobal("collections", Collection.all().order('created'))
    context.addGlobal("release_dates", ReleaseDate.all().order('date'))
    context.addGlobal("exchange_types", ExchangeType.all().order('type'))   
    context.addGlobal("instructions", Instruction.all().order('topic'))

    return self.render_html("secretary.pt", self.macros_from("master.pt", context))
示例#2
0
    def render_form(self, collection=None):
        context = simpleTALES.Context(allowPythonPath=True)

        context.addGlobal("title", "Manage Survival KIT Orders")
        context.addGlobal("root", "/manage/")
        context.addGlobal("orders", Order.uncollected())
        context.addGlobal("download", collection)
        context.addGlobal("collections", Collection.all().order("created"))
        context.addGlobal("release_dates", ReleaseDate.all().order("date"))
        context.addGlobal("exchange_types", ExchangeType.all().order("type"))
        context.addGlobal("instructions", Instruction.all().order("topic"))

        return self.render_html("secretary.pt", self.macros_from("master.pt", context))