def get(self): contents = Content.all().fetch(1000) theme_packages = ThemePackage.all().fetch(1000) themes = Theme.all().fetch(1000) pages = Page.all().fetch(1000) images = Image.all().fetch(1000) roles = Role.all().fetch(1000) sections = Section.all().fetch(1000) _users = User.all().fetch(1000) actions = ACTIONS template_values = {'logout_url':self.ws.users.create_logout_url('/'),'theme_packages': theme_packages,'themes': themes, 'images': images, 'pages': pages, 'contents':contents, 'roles':roles, 'users':_users, 'actions': actions, 'sections': sections, 'site': self.ws.site} self.response.out.write(template.render('templates/manage.html',template_values))
def more(): page = int(request.values['page']) size = int(request.values['size']) res = Page.all(page, size) return render_template("page-item.html", pageData=res)
def index(): # form = {'title':'素颜韵脚'} # Category.new(form) ps = Page.all(page=1) cs = Category.all() return render_template("index.html", pageData=ps, categorys=cs)