def pipeline_mashup(): for obj in pipeline_qs: m = Mashup(origin_county=obj.origin_county,origin_centriod=obj.origin_centriod, terminating_county=obj.terminating_county,terminating_centriod=obj.terminating_centriod, commodity_group=obj.commodity_group,distance=obj.distance,data='Pipeline Traffic',annual_traffic=obj.annual_traffic,stage_0 = obj.stage_0,stage_1 = obj.stage_1,stage_2 = obj.stage_2, stage_3 = obj.stage_3,stage_4 = obj.stage_4,stage_5 = obj.stage_5,stage_6 = obj.stage_6,stage_7 = obj.stage_7,stage_8 = obj.stage_8 ) m.save()
def rl_tfc_wrking_mashup(): for obj in rl_tfc_wrking_qs.iterator(): rail = Mashup(origin_county=obj.origin_county,origin_centriod=obj.origin_centriod, terminating_county=obj.terminating_county,terminating_centriod=obj.terminating_centriod, commodity_group=obj.commodity_group,distance=obj.distance,data='Rail Traffic', annual_traffic=obj.annual_traffic,stage_0 = obj.stage_0,stage_1 = obj.stage_1, stage_2 = obj.stage_2,stage_3 = obj.stage_3,stage_4 = obj.stage_4, stage_5 = obj.stage_5,stage_6 = obj.stage_6,stage_7 = obj.stage_7, stage_8 = obj.stage_8,scenario='Rail Traffic Working') rail.save()
def railtfc_mashup(): insert_list = [] for obj in rail_tfc_qs.iterator(): rail_tfc = Mashup(origin_county=obj.origin_county,origin_centriod=obj.origin_centriod, terminating_county=obj.terminating_county,terminating_centriod=obj.terminating_centriod, commodity_group=obj.commodity_group,distance=obj.distance,data='Rail Traffic', annual_traffic=obj.annual_traffic,stage_0 = obj.stage_0,stage_1 = obj.stage_1, stage_2 = obj.stage_2,stage_3 = obj.stage_3,stage_4 = obj.stage_4,scenario='Rail Base Case', stage_5 = obj.stage_5,stage_6 = obj.stage_6,stage_7 = obj.stage_7, stage_8 = obj.stage_8) rail_tfc.save()