def test(): #Get global reddit dataframe global_df = getGlobalData.getGlobalData() print "Seeems to work" print request.form['mySelect'] reddit_title = str(request.form['mySelect']) title_no_space = reddit_title.replace(" ", "") reddit_id = 'reddit_id' for i in range(len(global_df)): df_no_space = global_df['TITLE'][i].replace(" ", "") if df_no_space == title_no_space: reddit_id = global_df['AUTHOR'][i] #Get QA Data qa_df = getQAData.getQAData(reddit_id) author = 'bob' questions = 'questions' answers = 'answers' return render_template('test.html', my_locations=[3, 4, 5, 6, 7, 8, 9, 10], reddit_title=reddit_title, reddit_id = reddit_id, author=author, questions=questions, answers=answers, qa_df = qa_df)
def index(): #Get global reddit dataframe global_df = getGlobalData.getGlobalData() return render_template('index.html', title="MyTitle", global_df = global_df)