#new_call.report_num = call[ "report_num" ] #updated = True #if updated is True: #new_call.save() #print "UPDATING call: %s" % call[ "event_num" ] #update_count += 1 #else: skip_count +=1 print "SKIPPING call: %s" % call[ "event_num" ] except: try: new_call = Call() print "creating call for " + call[ "event_num" ] #call was created. lets set all our shit about it new_call.calltype = calltype new_call.beat = beat new_call.jurisdiction = juri new_call.event_num = call[ "event_num" ] new_call.response = call[ "response" ] new_call.description = call[ "description" ] if call[ "address" ] != "" and call[ "address" ] is not None: call[ "address" ] = call[ "address" ].replace( "&", " & ") call[ "address" ] = call[ "address" ].replace( "US65", "US 65" ) call[ "address" ] = call[ "address" ].replace( "JRF","James River Freeway" ) #for some reason there is a bunch of addresses that are like "N; Boonville instead of just N Boonville" call[ "address" ] = call[ "address" ].replace( ";", "" ) new_call.address = call[ "address" ] new_call.report_num = call[ "report_num" ]