def GET(self, name=None): user = model.get_user(name=name) if user: pages = model.get_pages(item_user=user.name) comments_on = model.get_comments(session.user.name, item_user=user.name) comments_by = model.get_comments(session.user.name, user_name=user.name) return render.user(user.name, pages, comments_on, comments_by)
def GET(self): if session.user.name == "Anonymous": raise web.seeother("/dashboard/login") pages = model.get_pages(item_user=session.user.name, limit=10) comments_on = model.get_comments(session.user.name, item_user=session.user.name, limit=5) comments_by = model.get_comments(session.user.name, user_name=session.user.name, limit=5) private_messages = model.get_messages(session.user.name, limit=5) return render.dashboard(session.user.name, pages, comments_on, comments_by, private_messages)
def GET(self, name, pg=0): page = model.get_page(name) pages = model.get_pages() ga = model.get_site().ga if bool(page): content = self.__getContent(page, pg) pgs = plain.pages(dict(page), pages) return render.page(ga, dict(page), content, pgs) else: raise web.seeother('/home')
def GET(self): pages = model.get_pages(True) return render.pages(pages)
def GET(self): """ Show page """ pages = model.get_pages() return render.index(pages)
def GET(self): '''show page''' pages = model.get_pages() l = pages.list return render.index(pages)
def GET(self): pages = model.get_pages() print(pages) for page in pages: print(page) return render.index(pages)
def GET(self): """Show page """ pages = model.get_pages() return render.index(pages)
def GET(self): page = model.get_pages() return render.index(page)