def before_request_handler(): # if not IndustryFirstCategory.table_exists(): # IndustryFirstCategory.create_table() if not IndustryCategory.table_exists(): IndustryCategory.create_table() if not IndustryThirdCategory.table_exists(): IndustryThirdCategory.create_table() if not Industrys.table_exists(): Industrys.create_table() if not ListItem.table_exists(): ListItem.create_table() if not ListItemTrend.table_exists(): ListItemTrend.create_table()