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