Exemple #1
0
    def keyword_feeds():
        if g.user.is_anonymous():
            abort(401)

        keyword_feeds = UserController.keyword_feeds(g.user)
        keyword_feeds = keyword_more.query(keyword_feeds,  _from=request.args.get('before', None))
        keyword_feeds['html'] = render_template('keyword-feeds.html', keyword_feeds=keyword_feeds)
        del keyword_feeds['feeds']
        return jsonify(keyword_feeds)
Exemple #2
0
    def mypage():
        if g.user.is_anonymous():
            abort(401)

        legislator = RegionController.legislator_of(g.user.address_id)
        district_feeds = UserController.district_feeds(legislator)
        district_feeds = district_more.query(district_feeds)
        keyword_feeds = UserController.keyword_feeds(g.user)
        keyword_feeds = keyword_more.query(keyword_feeds)
        return render_template('mypage.html',
                legislator=legislator,
                district_feeds=district_feeds,
                keyword_feeds=keyword_feeds)