コード例 #1
0
ファイル: bills.py プロジェクト: freejoe76/bill-tracker
def session_passed_detail(session, passfail, chamber):
    if session not in app.sessions:
        abort(404)
    app.page[
        'title'] = 'Legislation that %s the %s chamber in the %s session' % (
            passfail, chamber, session)
    app.page['description'] = ''
    app.page['url'] = build_url(app, request)

    q = BillQuery()
    q.session = session.upper()
    q.filter_session()
    data = {
        'upper': q.filter_action_dates('passed_upper'),
        'lower': q.filter_action_dates('passed_lower'),
    }
    if passfail == 'failed':
        data = {
            'upper': q.filter_failed(),
            'lower': q.filter_failed(),
        }
    response = {
        'app': app,
        'session': session,
        'passfail': passfail,
        'chamber': chamber,
        'data': data
    }
    return render_template('session_passed_detail.html', response=response)
コード例 #2
0
ファイル: bills.py プロジェクト: freejoe76/bill-tracker
def session_signed_detail(session):
    if session not in app.sessions:
        abort(404)

    app.page[
        'title'] = 'Legislation Colorado\'s governor signed into law in the %s session' % session
    app.page[
        'description'] = 'A list of legislation passed into law in the %s session' % session
    app.page['url'] = build_url(app, request)

    q = BillQuery()
    q.session = session.upper()
    q.filter_session()
    data = {
        'bills': q.filter_action_dates('signed'),
    }
    response = {
        'app': app,
        'data': data,
        'session': session,
    }
    return render_template('session_signed_detail.html', response=response)