def main(): lite.init(globals()) if _ENV['QUERY_STRING'] == '': return testEcho() if _GET['testCookie'] is not None: return testCookie() if _GET['testSetCookie'] is not None: return testSetCookie() if _GET['testPost'] is not None: return testPOST() if _GET['testPosts'] is not None: return testPOSTS() if _GET['testGet'] is not None: return testGET() if _GET['testGets'] is not None: return testGETS()
def main(): lite.init(globals()) html = I18nIndex(wife='linda', i18n=i18n).render() echo(html)
def main(): lite.init(globals()) echo("111=="+str(time.time()))
from google.appengine.ext import db from pili.db import Model2 import time,datetime,re from pili import lite lite.init(globals()) """ This file describe """ class BloggerApi(object): list_item_num = 20 def __init__(self): pass def createBlog(self, blog_id, owner, blog_name, **kwds): if not re.match(r"^[a-z]\w+$", blog_id): return False if BlogMeta.get_by_key_name(blog_id) is not None: return False blog = BlogMeta(key_name=blog_id, blog_id=blog_id, owner=owner, blog_name=blog_name) blog.put() return True def listBlogs(self, owner, page=1): return BlogMeta.all().filter('owner =',owner).fetch( self.list_item_num, (page-1)*self.list_item_num) # model