Ejemplo n.º 1
0
    def GET(self):
        context = web.ctx.request
        uid = web.ctx.session.uid
        posts = web.ctx.orm.query(Post).filter(Post.user_id==int(uid)).order_by('posts.id DESC')
        context['posts'] = posts

        return render_template("posts/list.html", **context)
Ejemplo n.º 2
0
    def GET(self):
        context = web.ctx.session.request
        uid = web.ctx.session.uid
        user = web.ctx.orm.query(User).filter(User.id==int(uid)).first()
        email = user.email
        context['email'] = email
        context['uid'] = uid

        return render_template("auth/set_profile.html", **context)
Ejemplo n.º 3
0
    def GET(self):

        context = web.ctx.request
        uid = web.ctx.session.uid
        po = web.ctx.orm.query(Profile).filter(Profile.user_id==int(uid)).first()

        context['username'] = po.username
        web.ctx.session.username = po.username

        return render_template("home.html", **context)
Ejemplo n.º 4
0
 def GET(self):
     if web.ctx.session.login == 1:
         raise web.seeother("/home")
     return render_template("index.html")
Ejemplo n.º 5
0
    def GET(self):
        if web.ctx.session.login == 1:
            raise web.seeother('/home')

        return render_template("auth/reg.html")
Ejemplo n.º 6
0
    def GET(self):
        context = web.ctx.request
        context['email'] = web.ctx.session.email

        return render_template("auth/succ.html", **context)
Ejemplo n.º 7
0
    def GET(self, pid):
        context = web.ctx.request
        post = web.ctx.orm.query(Post).filter(Post.id==int(pid)).first()

        context['post'] = post
        return render_template("posts/sign_post.html", **context)
Ejemplo n.º 8
0
 def GET(self):
     context = web.ctx.request
     return render_template("posts/addpost.html", **context)