Пример #1
0
def index():
    show_create = True
    if ('filter_user_id' in session):
        db_quotes = db.get_all_quotes_for(session['filter_user_id'])
        del session['filter_user_id']
        show_create = False
    else:
        db_quotes = db.get_all_quotes()
    return render_template('index.html', quotes=db_quotes, show_create=show_create)
Пример #2
0
def search_users(query):
    try:
        users = search_by_user_or_email(query)
        print('------------------------')
        uids = []
        for u in users:
            uids.append(str(u.id))
            
        return render_template('index.html', all_quotes = get_all_quotes_by_uids(','.join(uids)))
    except:
        flash('username didnt match.')

    return render_template('index.html', all_quotes = get_all_quotes())
Пример #3
0
def index():
    quotes = get_all_quotes()
    return render_template('index.html', all_quotes=quotes)
Пример #4
0
def index():
    return render_template('index.html', quotes=get_all_quotes())
Пример #5
0
def index():
    db_quotes = db.get_all_quotes()
    return render_template('index.html', quotes=db_quotes)