コード例 #1
0
def index():
    newsPosts = db_session.query(NewsPost).all()
    if len(newsPosts) > 0:
        top = newsPosts[len(newsPosts) - 1]
        no_news = False
    else:
        no_news = True
        top = 0

    return render_template('index.html', NEWS=top, NO_NEWS=no_news)
コード例 #2
0
def index():
    newsPosts = db_session.query(NewsPost).all()
    if len(newsPosts) > 0:
        top = newsPosts[len(newsPosts)-1]
        no_news = False
    else:
        no_news = True
        top = 0

    return render_template('index.html', NEWS=top, NO_NEWS = no_news)
コード例 #3
0
def jobs():
    jobs = db_session.query(Job).all()

    return render_template('jobs.html', JOBS=jobs, \
            NAV_ACTIVE='jobs')
コード例 #4
0
def news():
    newsPosts = reversed(db_session.query(NewsPost).all())

    return render_template('news.html', NEWSPOSTS=newsPosts, \
            NAV_ACTIVE='news')
コード例 #5
0
def jobs():
    jobs = db_session.query(Job).all()

    return render_template('jobs.html', JOBS=jobs, \
            NAV_ACTIVE='jobs')
コード例 #6
0
def news():
    newsPosts = reversed(db_session.query(NewsPost).all())

    return render_template('news.html', NEWSPOSTS=newsPosts, \
            NAV_ACTIVE='news')