app/database/db_functions.py
def add_fighter(self, fighter_stat_list, fighter_career_history):
        """Add a fighter to db."""

        # add person's row
        self.add_fighter_row(fighter_name=fighter_stat_list[0])

        # fulfill this row with his stats
        self.update_fighter_row(fighter_stat_list=fighter_stat_list)

        # create fighter's career history table
        table_name = fighter_stat_list[0].replace(' ', '_', 1).split()[0]
        self.career_history_create_table(table_name=table_name)

        # add his fights (rows) to this table
        self.career_history_add_fights(
            table_name=table_name, fighter_career_history=fighter_career_history)
Add a fighter to db.
Add a fighter to db.
Add a fighter to db .
def add_fighter(self, fighter_stat_list, fighter_career_history):
        self.add_fighter_row(fighter_name=fighter_stat_list[0])
        self.update_fighter_row(fighter_stat_list=fighter_stat_list)
        table_name = fighter_stat_list[0].replace(' ', '_', 1).split()[0]
        self.career_history_create_table(table_name=table_name)
        self.career_history_add_fights(
            table_name=table_name, fighter_career_history=fighter_career_history)
def add_fighter ( self , fighter_stat_list , fighter_career_history ) : self . add_fighter_row ( fighter_name = fighter_stat_list [ 0 ] ) self . update_fighter_row ( fighter_stat_list = fighter_stat_list ) table_name = fighter_stat_list [ 0 ] . replace ( ' ' , '_' , 1 ) . split ( ) [ 0 ] self . career_history_create_table ( table_name = table_name ) self . career_history_add_fights ( table_name = table_name , fighter_career_history = fighter_career_history )
Add a fighter to db.
Add a fighter to db .
"""Add a fighter to db.""" # add person's row # fulfill this row with his stats # create fighter's career history table # add his fights (rows) to this table
self
fighter_stat_list
fighter_career_history