Пример #1
0
 def initialize_teams(self):
     ct = ConnectorTeam()
     for ct_team in ct.fetch_team_data():
         team = Team()
         team.id = ct_team['iId']
         team.name = ct.fetch_team_item(team.id, 'name')
         team.country = ct.fetch_team_item(team.id, 'country')
         team.country_flag = ct.fetch_team_item(team.id, 'country_flag')
         team.info_url = ct.fetch_team_item(team.id, 'info_url')
         team.coach_name = ct.fetch_team_item(team.id, 'coach_name')
         team.save()