Example #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)
Example #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)
Example #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)
Example #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=[])