示例#1
0
文件: index.py 项目: kisspy/abcms
    def get(self, aid=None):
        if aid is None:
            aid = self.aid
        form = forms.HelloForm()
        a = A.select().where(A.id == aid).get()
        blist = [(b, C.select().where(C.parent == b))
                 for b in B.select().where(B.parent == a)]
        context = {'a': a, 'blist': blist, 'form': form}

        self.render('index.html', **context)
示例#2
0
文件: index.py 项目: kisspy/abcms
    def get(self):
        form = forms.HelloForm()
        a = A.select().where(A.id == 1).get()
        blist = [(b, C.select().where(C.parent == b))
                 for b in B.select().where(B.parent == a)]
        context = {'a': a, 'blist': blist, 'form': form}
        alist = A.select().order_by(A.id)
        context.update(alist=alist)

        self.render('index.html', **context)
示例#3
0
文件: app.py 项目: pprivulet/insight
 def post(self):
     form = forms.HelloForm(self)
     if form.validate():
         self.write('Hello %s' % form.planet.data)
     else:
         self.render('index.html', form=form)
示例#4
0
 def get(self):
     form = forms.HelloForm()
     self.render('blog.html', form=form)
示例#5
0
 def get(self):
     form = forms.HelloForm()
     self.render('about.html', form=form)
示例#6
0
 def get(self):
     form = forms.HelloForm()
     self.render('resume.html', form=form)