示例#1
0
文件: cookies.py 项目: ZiTAL/zpy
    def set(self):
        params = {}
        params["key"] = "key"
        params["value"] = "zpy is the law"

        Cookie.set(params["key"], params["value"], 3600)

        return View.load("/cookie/set.tpl", params)
示例#2
0
文件: cookies.py 项目: ZiTAL/zpy
 def destroy(self):
     Cookie.delete("key")
     return View.load("/cookie/destroy.tpl")
示例#3
0
文件: cookies.py 项目: ZiTAL/zpy
    def get(self):
        params = {}
        params["key"] = "key"
        params["value"] = Cookie.get("key")

        return View.load("/cookie/get.tpl", params)