示例#1
0
 def load_states(self):
     # Load states
     logging.info('load_states:')
     states = self.bootstrap_json["states"]
     for state in states:
         state = State(state_abbreviation=state["state_abbreviation"],
                       college_votes=int(state["college_votes"]),
                       party_score_votes=[0, 0],
                       party_score_sway=[0, 0])
         state.put()
示例#2
0
 def load_states(self):
     # Load states
     logging.info('load_states:')
     states = self.bootstrap_json["states"]
     for state in states:
         state = State(
             state_abbreviation = state["state_abbreviation"],
             college_votes = int(state["college_votes"]),
             party_score_votes = [0, 0],
             party_score_sway = [0, 0]
         )
         state.put()