def delete_record_pro(): # 하이퍼링크의 데이터값 전달받기 c_code = request.args['c_code'] # 삭제함수 호출 db.delete_record(c_code) country_list = db.get_country_list() return render_template('start.html', country_list=country_list)
def summarize_agreement(): """ Summarize agreement levels """ country_list = get_country_list() countries = OrderedDict() for country in country_list: if country in ANALYSIS_COUNTRIES: countries[country] = OrderedDict((('country', country), )) for question_id in ANALYSIS_QUESTIONS: question, result = query(question_id) if question['question_type'] == 'mentioned': process_mentioned(question, result, countries) if question['question_type'] == 'agree_3way': process_agree_3way(question, result, countries) if question['question_type'] == 'agree_4way': process_agree_4way(question, result, countries) if question['question_type'] == 'likert': process_likert(question, result, countries) dataset.freeze(countries.values(), format='csv', filename='output/agreement_summary.csv')
def summarize_agreement(): """ Summarize agreement levels """ country_list = get_country_list() countries = OrderedDict() for country in country_list: if country in ANALYSIS_COUNTRIES: countries[country] = OrderedDict((('country', country),)) for question_id in ANALYSIS_QUESTIONS: question, result = query(question_id) if question['question_type'] == 'mentioned': process_mentioned(question, result, countries) if question['question_type'] == 'agree_3way': process_agree_3way(question, result, countries) if question['question_type'] == 'agree_4way': process_agree_4way(question, result, countries) if question['question_type'] == 'likert': process_likert(question, result, countries) dataset.freeze(countries.values(), format='csv', filename='output/agreement_summary.csv')
def index(): # 테이블 전체 레코드 저장 => 리스트 딕셔너리 country_list = db.get_country_list() # 문자열구조로 변경해서 반환 # return str(country_list) return render_template('index4.html', country_list=country_list, totalCount=len(country_list))
def add_record_pro(): # post 입력 데이타를 변수에 저장한다. # 변수명 = request.form[폼요소의name값] c_code = request.form['c_code'] c_name = request.form['c_name'] c_continent = request.form['c_continent'] c_population = request.form['c_population'] c_gnp = request.form['c_gnp'] print(c_population) # 레코드 추가 함수 호출 db.add_record(c_code, c_name, c_continent, c_population, c_gnp) # 레코드 목록 호출 country_list = db.get_country_list() return render_template('start.html', country_list=country_list)
def country_list(): country_list = db.get_country_list() return render_template('index_countryList.html', country_list=country_list, totalcount=len(country_list))
def index(): country_list=db.get_country_list() return render_template('db_table.html', country_list=country_list)
def delete_record(): country_list = db.get_country_list() return render_template('delete_record.html', country_list=country_list)
def index(): country_list = db.get_country_list() return render_template('start.html', country_list=country_list)