예제 #1
0
    def POST(self):
        form = self.form()
        clips = model.get_clips(getuser())

        if not form.validates():
            return render.index(clips, form)

        model.new_clip(form.d.title, form.d.content, getuser())
        raise web.seeother('/')
예제 #2
0
    def GET(self):
        """ Show page """
        clips = model.get_clips(getuser())
        form = self.form()

        return render.index(clips, form)