# encoding:utf-8
activities = [
	{"code": u"1", "name": u"Jornales"},
	{"code": u"2", "name": u"Celaduria porteria"},
	{"code": u"3", "name": u"Fertilización Manual"},
	{"code": u"4", "name": u"Fertilización con voleadora"},
	{"code": u"5", "name": u"Transporte de fertilizalante"},
	{"code": u"6", "name": u"Fertilización borax"},
	{"code": u"7", "name": u"Mezcla Fertilizante"},
	{"code": u"8", "name": u"Cargue fertilizante"},
	{"code": u"9", "name": u"Ayudante Fertilización"},
	{"code": u"10", "name": u"Tractorista Fertilización"},
	{"code": u"11", "name": u"Limpieza piscina de oxidación"},
	{"code": u"12", "name": u"Jornal Planta Extractora"},
	{"code": u"13", "name": u"Jornal lavada de Tanques"},
	{"code": u"14", "name": u"Plateo con guadaña"},
	{"code": u"15", "name": u"Plateo Químico"},
	{"code": u"16", "name": u"Limpieza de platos (Rastrilla}"},
	{"code": u"17", "name": u"Guachapeo (Rocería}"},
	{"code": u"18", "name": u"Roceria manual de canales principales"},
	{"code": u"19", "name": u"Roceria manual de canales secundarios"},
	{"code": u"20", "name": u"Control de malezas con Rotospeed"},
	{"code": u"21", "name": u"Control de malezas con rolo"},
	{"code": u"22", "name": u"Control de malezas con palo"},
	{"code": u"23", "name": u"Jornal de riego"},
	{"code": u"24", "name": u"Poda 7 meses"},
	{"code": u"25", "name": u"Poda 8 meses"},
	{"code": u"26", "name": u"Poda 9 meses"},
	{"code": u"27", "name": u"Poda 10 meses"},
	{"code": u"28", "name": u"Poda 11 meses"},
	{"code": u"29", "name": u"Poda 12 meses"},
	{"code": u"30", "name": u"Hora retroexcavadora"},
	{"code": u"31", "name": u"Hora guadaña"},
	{"code": u"32", "name": u"Siembra mucuna - KUDZU"},
	{"code": u"33", "name": u"Plateo con guadaña todo costo"},
	{"code": u"34", "name": u"Plateo con Herbis"},
	{"code": u"35", "name": u"Poda Ranchones"},
	{"code": u"36", "name": u"Jornal Bocatoma"},
	{"code": u"37", "name": u"Envagonetado"},
	{"code": u"38", "name": u"Aceite Producido"},
	{"code": u"39", "name": u"Almendra Producida"},
	{"code": u"40", "name": u"Cargue de Almendra"},
	{"code": u"41", "name": u"Descargue torta palmiste"},
	{"code": u"42", "name": u"Manejo caldera para calentamiento de aceite y almendra"},
	{"code": u"43", "name": u"Proceso nuez"},
	{"code": u"44", "name": u"Lavada Lonas"},
	{"code": u"45", "name": u"Corte de fruta"},
	{"code": u"46", "name": u"Recolección fruto"},
	{"code": u"47", "name": u"Cargue de fruto"},
	{"code": u"48", "name": u"Descargue de fruto"},
	{"code": u"49", "name": u"Transporte de fruto"},
	{"code": u"50", "name": u"Transporte de tusa, impurezas, fibra y otros"},
	{"code": u"51", "name": u"Cargue y descargue otros"},
	{"code": u"52", "name": u"Horas tractor"},
	{"code": u"53", "name": u"Cargue de fruto con retroescavadora"},
	{"code": u"54", "name": u"Repepeo"},
	{"code": u"55", "name": u"Horas tractor Palmallanito y Plantaciónes"},
	{"code": u"56", "name": u"Cargue fruto Palmallanito y Plantaciónes"},
	{"code": u"57", "name": u"Descargue fruto Palmallanito y Plantaciónes"},
	{"code": u"58", "name": u"Cuidado animales"},
	{"code": u"59", "name": u"Peso promedio lote tractorista"},
	{"code": u"60", "name": u"Peso promedio lote carguero"},
	{"code": u"61", "name": u"Corte fruta Palmallanito"},
	{"code": u"62", "name": u"Recolección fruta Palmallanito"},
	{"code": u"63", "name": u"Transporte fruto otras plantaciónes"},
	{"code": u"64", "name": u"Recolección adultos Cyparissius"},
	{"code": u"65", "name": u"Aplicación insecticidas con bomba espalda Focos ML"},
	{"code": u"66", "name": u"Aplicación mezcla para PC"},
	{"code": u"67", "name": u"Poda palma ML"},
	{"code": u"68", "name": u"Desinfección herramienta"},
	{"code": u"69", "name": u"Control de stomoxys lote"},
	{"code": u"70", "name": u"Tratamiento inyección de palmas"},
	{"code": u"71", "name": u"Control de stmoxys perimetral"},
	{"code": u"72", "name": u"Control hormigas"},
	{"code": u"73", "name": u"Cirugia PC"},
	{"code": u"74", "name": u"Control y monitoreo trampas rynchophorus"},
	{"code": u"75", "name": u"Recirugia PC"},
	{"code": u"76", "name": u"Censo enfermedades letales otras plantaciónes"},
	{"code": u"77", "name": u"Control de stmoxys lote otras plantaciónes"},
	{"code": u"78", "name": u"Nomenclatura marcación"},
	{"code": u"79", "name": u"Jornal fumigación JACTO"},
	{"code": u"80", "name": u"Siembra de palma"},
	{"code": u"81", "name": u"Cargue y descargue palma"},
]

users = [
	{"username":"80243365", "last_name": "ACERO LEONIS", "first_name": "ADONIS"},
	{"username":"1037479990", "last_name": "AGRESOTT LUNA", "first_name": "CAMILO"},
	{"username":"86053102", "last_name": "ALFONSO MARTINEZ", "first_name": "FABIO"},
	{"username":"86040943", "last_name": "ALFONSO MARTINEZ", "first_name": "FELIPE"},
	{"username":"80523148", "last_name": "ALMONACID PEÑA", "first_name": "GELBER ONEIBER"},
	{"username":"1004049306", "last_name": "ALVARADO GONZALEZ", "first_name": "ALEXANDER"},
	{"username":"1121900597", "last_name": "ARENAS CHALA", "first_name": "CESAR IVAN"},
	{"username":"12458467", "last_name": "ARIAS MERCHAN", "first_name": "CRISTO URIEL"},
	{"username":"3298989", "last_name": "AYA ORTIZ", "first_name": "PRIMITIVO"},
	{"username":"86058624", "last_name": "BALANTA BALANTA", "first_name": "JOSE MILFER"},
	{"username":"1002885560", "last_name": "BALANTA SANDOVAL", "first_name": "CESAR DAVID"},
	{"username":"19562278", "last_name": "BARRIO SUAREZ", "first_name": "FREDIS ANTONIO"},
	{"username":"11281185", "last_name": "BONILLA OLMOS", "first_name": "LUIS ALEXANDER"},
	{"username":"1071890323", "last_name": "BONILLA OLMOS", "first_name": "RICARDO DAVID"},
	{"username":"5045749", "last_name": "BOTELLO CHINCHILLA", "first_name": "JESUS SALVADOR"},
	{"username":"79924066", "last_name": "BUITRAGO CASTAÑO", "first_name": "FABIAN"},
	{"username":"12207436", "last_name": "CAMPOS CABRERA", "first_name": "ISIDORO"},
	{"username":"1085108278", "last_name": "CANTILLO RAMOS", "first_name": "DANITH RAUL"},
	{"username":"19563515", "last_name": "CAÑATE CHARRIS", "first_name": "FAUSTINO JOSE"},
	{"username":"19562471", "last_name": "CAÑATE CHARRIS", "first_name": "OMAR ANTONIO"},
	{"username":"76336703", "last_name": "CARABALI", "first_name": "HAROLD"},
	{"username":"1001589370", "last_name": "CARO VARGAS", "first_name": "JORGE LUIS"},
	{"username":"1069900257", "last_name": "CHALA BEJARANO", "first_name": "YEISON"},
	{"username":"1121817728", "last_name": "CHALA URREA", "first_name": "CARLOS DARIO"},
	{"username":"74852636", "last_name": "CHAVITA", "first_name": "EDUIM"},
	{"username":"1121829138", "last_name": "GAITAN SANCHEZ", "first_name": "EDUARDO HORACIO"},
	{"username":"74847168", "last_name": "GAITAN TUMAY", "first_name": "JOSE DEL CARMEN"},
	{"username":"19615186", "last_name": "GARCIA VILLAFAÑE", "first_name": "ALGEMIRO FRANCISCO"},
	{"username":"10741088", "last_name": "GOLU MURILLO", "first_name": "JOSE VISMAR"},
	{"username":"80523286", "last_name": "GOMEZ AGUILERA", "first_name": "ARIEL FERNANDO"},
	{"username":"76233642", "last_name": "GONZALEZ GUAZA", "first_name": "CARLOS EDGAR"},
	{"username":"19562694", "last_name": "GUTIERREZ DOMINGUEZ", "first_name": "HENRY"},
	{"username":"80522913", "last_name": "HERNANDEZ GARZON", "first_name": "OSCAR JAVIER"},
	{"username":"12914544", "last_name": "IBARRA PAYAN", "first_name": "ALEJANDRO"},
	{"username":"474793", "last_name": "JIMENEZ DUQUE", "first_name": "JOSE"},
	{"username":"1001588787", "last_name": "JULIO ARRIETA", "first_name": "LUIS CARLOS"},
	{"username":"93376602", "last_name": "LEAL SUAREZ", "first_name": "ALAIS"},
	{"username":"17267818", "last_name": "LOZANO CARDENAS", "first_name": "JOSELITO"},
	{"username":"74865473", "last_name": "MACHADO MENDIVELSO", "first_name": "EDGAR ARNEY"},
	{"username":"19562464", "last_name": "MALDONADO CABARCAS", "first_name": "MAXIMILIANO"},
	{"username":"4847241", "last_name": "MORENO VALOIS", "first_name": "EUCEBIO"},
	{"username":"1115851013", "last_name": "MUÑOZ RIVEROS", "first_name": "JOHN HELMY"},
	{"username":"10951956", "last_name": "NEGRETE HERNANDEZ", "first_name": "OMAR ENRIQUE"},
	{"username":"87941395", "last_name": "OCAMPO MICOLTA", "first_name": "JORGE FAUSTINO"},
	{"username":"1087200865", "last_name": "OROBIO", "first_name": "LUIS MIGUEL"},
	{"username":"87940045", "last_name": "OROBIO PAZ", "first_name": "JOSE PASTOR"},
	{"username":"19620139", "last_name": "OROZCO HERNANDEZ", "first_name": "DAVID"},
	{"username":"10007603", "last_name": "ORREGO TELLEZ", "first_name": "JUAN PABLO"},
	{"username":"1006655851", "last_name": "OSORIO MOLINA", "first_name": "JORGE ANDRES"},
	{"username":"4524115", "last_name": "OSORIO", "first_name": "TIRADO EUCLIDES"},
	{"username":"8189581", "last_name": "OSPINO", "first_name": "DAVID"},
	{"username":"1071889534", "last_name": "OSPINO PEREZ", "first_name": "LUIS ENRIQUE"},
	{"username":"10778026", "last_name": "PANTOJA HOYOS", "first_name": "FERNEY FERNANDO"},
	{"username":"11281135", "last_name": "PARRA LEON", "first_name": "JOSE RODRIGO"},
	{"username":"98427808", "last_name": "PAZ", "first_name": "JAIME LUIS"},
	{"username":"3274174", "last_name": "PEÑA AMAYA", "first_name": "RAFAEL ANTONIO"},
	{"username":"1087111861", "last_name": "QUIÑONES MANCILLA", "first_name": "FAVIAN ISMAEL"},
	{"username":"17288434", "last_name": "RONDON CRUZ", "first_name": "", "first_name": "JOSE NELSON"},
	{"username":"19562451", "last_name": "RODRIGUEZ BENAVIDES", "first_name": "ADOLFO CESAR"},
	{"username":"80522925", "last_name": "RODRIGUEZ GARZON", "first_name": "HECTOR ALBERTO"},
	{"username":"11280877", "last_name": "ROLDAN FERRER", "first_name": "ALEXIS"},
	{"username":"4163927", "last_name": "SALGADO BARAHONA", "first_name": "JOSE DEOGRACIAS"},
	{"username":"1039080164", "last_name": "SALGADO MENESES", "first_name": "JANET ALBERTO"},
	{"username":"19562828", "last_name": "SANCHEZ LARA", "first_name": "WILINTON RAFAEL"},
	{"username":"9818479", "last_name": "SANCHEZ LOPEZ", "first_name": "WILLIAM ANDRES"},
	{"username":"19617051", "last_name": "SANCHEZ MANCILLA", "first_name": "TIBALDO ANTONIO"},
	{"username":"17267384", "last_name": "SANCHEZ ZIPA", "first_name": "LUIS FARID"},
	{"username":"9875443", "last_name": "SANTANA RUIZ", "first_name": "JORGE LUIS"},
	{"username":"74810018", "last_name": "TORO", "first_name": "JAIRO JOSUE"},
	{"username":"1105305301", "last_name": "TORRES VILLALOBOS", "first_name": "DAVINSON ARLES"},
	{"username":"19617100", "last_name": "TOVAR BALLESTERO", "first_name": "JUAN BAUTISTA"},
	{"username":"80523731", "last_name": "URREGO ALFONSO", "first_name": "JAVIER  GIOVANNI"},
	{"username":"98429491", "last_name": "VALENCIA CASTILLO", "first_name": "JULIO FERNANDO"},
	{"username":"1060359584", "last_name": "VALENCIA OCORO", "first_name": "FARID"},
	{"username":"1001936882", "last_name": "VALENCIA RAMIREZ", "first_name": "ENRIQUE RICAEL"},
	{"username":"1002202260", "last_name": "VALENCIA RAMIREZ", "first_name":"MIGUEL ANGEL"},
]
from apps.process_admin.models import Activities, UserProfile, UserType
from django.contrib.auth.models import User
import datetime


def charge_activities():
	activities_list = []
	u = User.objects.get(id=1)
	for a in activities:
		activities_list.append(Activities(value="0", user=u, **a))
	Activities.objects.bulk_create(activities_list)


def charge_users():
	up_list = []
	empleado = UserType.objects.get_or_none(name="Empleado")
	for u in users:
		user = User.objects.create(**u)
		# print "USUARIO:", user
		up_list.append(UserProfile(dni=user.username, user=user, user_type=empleado, date_born=datetime.datetime.now()))
	UserProfile.objects.bulk_create(up_list)
