Пример #1
0
 def GET(self, data):
     data = web.input()
     page = data['page']
     news = ctrl.getAllNewsList(1)
     print '@'*50
     print 'get news page:', news
     render = web.template.frender("templates/ajax_load_more_news.html")
     return render(news)
Пример #2
0
    def GET(self):
        #t = web.template.frender('templates/index.html')
        render = web.template.render("templates/", base="template")
        print '@'*50
        print 'session.userid', session.userid
        if session.userid == -1:
            return render.login()

        userinfo = ctrl.userInfo(session.userid)
        messages = ctrl.userGetMessages(session.userid)
        news = ctrl.getAllNewsList(0)
        circles = ctrl.getUserCircle(session.userid)
        tags = ctrl.getTags()
        return render.user_index(userinfo, messages['count'], messages['messages'], news, circles, tags)