def createCompany(): data = request.get_json() table = "company" columns = "name" values = str(data['name']) obj = DB() id_row = obj.queryInsert(table, columns, values) return id_row
def createTitle(): table = "title" columns = "name" values = request.form['textbox-title'] print values obj = DB() id_row = obj.queryInsert(table, columns, values) print id_row obj = Title() return obj.getTitle()
def getTitle(self): table = "title" columns = "name" obj = DB() id_row, list_rows = obj.querySelect(table, columns) list_titles = [] for title in list_rows: list_titles.append(title[0]) print list_titles values = list_titles return render_template('titles.html', list_titles=values)
def getApplication(self): table = "application" columns = "title, company, location, next_action" obj = DB() id_row, list_rows = obj.querySelect(table, columns) list_applications = [] for row in list_rows: application = {} application['title'] = row[0] application['company'] = row[1] application['location'] = row[2] application['next_action'] = row[3] list_applications.append(application) print list_applications values = list_applications return render_template('applications.html', list_applications=values)
def createApplication(): print "insdie application create" table = "application" columns = "" values = "" dict_form_data = request.form for key in dict_form_data: columns = columns + "," + key values = values + "," + "'" + dict_form_data[key] + "'" columns = columns[1:] values = values[1:].strip() print values obj = DB() id_row = obj.queryInsert(table, columns, values) print id_row obj = Application() return obj.getApplication()