Esempio n. 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)
Esempio n. 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())
Esempio n. 3
0
def index():
    quotes = get_all_quotes()
    return render_template('index.html', all_quotes=quotes)
Esempio n. 4
0
def index():
    return render_template('index.html', quotes=get_all_quotes())
Esempio n. 5
0
def index():
    db_quotes = db.get_all_quotes()
    return render_template('index.html', quotes=db_quotes)