예제 #1
0
 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)
예제 #2
0
    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)