Ejemplo n.º 1
0
    def userposts(self, userid):
        posts = model.get_all_userposts(userid)
        if not len(posts):
            raise cherrypy.HTTPError(404, "No posts found")

        projects = model.get_userprojects(userid)
        return render('userposts.xhtml', userid=userid, posts=posts, team=[], projects=projects)
Ejemplo n.º 2
0
    def userposts(self, userid):
        posts = model.get_all_userposts(userid)
        if not len(posts):
            raise cherrypy.HTTPError(404, "No posts found")

        projects = model.get_userprojects(userid)
        return render('userposts.xhtml',
                      userid=userid,
                      posts=posts,
                      team=[],
                      projects=projects)
Ejemplo n.º 3
0
    def user(self, userid):
        cur = model.get_cursor()

        cur.execute('''SELECT userid FROM users WHERE userid = ?''',
                    (userid,))
        if cur.fetchone() is None:
            raise cherrypy.HTTPError(404, "User not found")

        userposts, thispost = model.get_user_posts(userid)

        projects = model.get_userprojects(userid)
        teamposts = model.get_teamposts(userid)

        return render('user.xhtml', userid=userid, projects=projects,
                      teamposts=teamposts, userposts=userposts)
Ejemplo n.º 4
0
    def user(self, userid):
        cur = model.get_cursor()

        cur.execute('''SELECT userid FROM users WHERE userid = ?''',
                    (userid, ))
        if cur.fetchone() is None:
            raise cherrypy.HTTPError(404, "User not found")

        userposts, thispost = model.get_user_posts(userid)

        projects = model.get_userprojects(userid)
        teamposts = model.get_teamposts(userid)

        return render('user.xhtml',
                      userid=userid,
                      projects=projects,
                      teamposts=teamposts,
                      userposts=userposts,
                      team=[])