ĜUc @sddkTddkTddkTddkTddkTddkTddklZddkTddk Tddk l Z ddk Tddk lZddklZlZddkZddklZddklZdd klZdd klZlZdd klZddklZdd klZdd klZlZddkl Z ddkZddk!TdZ"dZ#dZ$dZ%edddZ&edddZ'dZ(dZ)edddZ*dZ+edddZ,edddZ-edddZ.dZ/edddZ0eddd Z1eddd!Z2eddd"Z3eddd#Z4d$Z5eddd%Z6eddd&Z7eddd'Z8eddd(Z9eddd)Z:eddd*Z;eddd+Z<dd,k=l>Z>e>d-Z?dd,k=l>Z>e>d.Z@eddd/ZAeddd0ZBeddd1ZCeddd2ZDeddd3ZEd4ZFeddd5ZGedd6d7ZHeddd8ZIeddd9ZJeddd:ZKeddd;ZLeddd<ZMeddd=ZNeddd>ZOeddd?ZPdd,k=l>Z>e>d@ZQdd,k=l>Z>e>dAZRedddBZSedddCZTedddDZUdEZVdFeWfdGYZXdHeYeXfdIYZZdJeYeXfdKYZ[dLeYeXfdMYZ\dS(Ni(t*(tUser(tmessages(tformats(tGroupt PermissionN(t serializers(tUserCreationForm(tTemplateResponse(t format_htmltformat_html_join(tPermissionDenied(tHttp404(tlogin_requiredtuser_passes_test(t JasperClientcCs t|dS(Ns login.html(R(trequest((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytlogin_#scCst|dhdd6dd6dd6dd6dd6dd 6dd 6dd 6dd 6dd 6dd6dd6dd6dd6dd6dd6dd6dd6S(Ns perfil.htmltactivet principaltclosedtRevisiontactivot no_activotMedicot PsicologiatconfiguracionestSocialt Pedagogiat Nutriciont PreregistrotRegistrotJuridicot parentescotCanalizatEgresotFoto(R(Rtuser_id((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytperfil&scCs|io|id}|id}td|d|}|dj o6|iot||tdSti|dqti|dnt|dS(Ntusernametpasswords/indexscuenta desactivadas-Usuario no valido, verifique sus credencialess login.html( tPOSTt authenticatetNonet is_activetlogintHttpResponseRedirectRterrorR(RR'R(tuser((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pyt validarView/s       cCst|}tdS(Ns/login(tlogoutR.(Rtresponse((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pyt logout_userBs t login_urls/logincCs|iip*tiid|iig}tiid|}|idjo tdS|idjo tdS|idjo tdS|id jo td S|id jo td S|id jo tdS|idjo tdS|idjo tdS|idjo tdSnt |dhdd6dd6dd6dd6dd6dd6dd6dd6dd 6dd!6dd6dd"6dd#6dd$6dd%6dd&6dd'6dd(6S()Ntuser__intempleadois/diagnostico/principal_juridicois/diagnostico/principal_socialis/diagnostico/principal_medicois/diagnostico/principalis /diagnostico/principal_pedagogiais /diagnostico/principal_nutricionis/revisa/principal_tecnicois/revisa/principal_coordinacioni s/revisa/busquedapresidencia/s index.htmlRRRRRRRRRRRRRRR R!R"R#R$( R0tis_stafftEmpleadotobjectstfiltertidtAreatgetR.R(RR7tarea((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytindexFs8         c Csk|idjo9t|i}t|i}|iid}t|i}t|i}|io|io|io|i}|i i }t i i d|}ti i dd} ti i dd} tii} | i} tdd d |d | } | it| i d t| | _| i|id t}y%|id}|o d|_nWn*tj o}|i}||_nX|d|_| |_| i|_||_| |_|i|id t}| i|_| |_|i|it i!|dt"d| ii Snpt}t}t}tdhdd6}t#i i$dd|i%d_&t'i i$dd|i%d_&t(dh|d6|d6|d6|d6dd 6dd!6dd"6dd#6dd$6dd%6dd&6dd'6dd(6dd)6dd$6d*d+6dd,6dd-6dd.6dd/6dd06dd16d2t)|S(3NR)t observacionesR0tpkitclavetNItnumeros/2013tmenortestatust/tcommittSituacion_CalleisPre- Registro con éxitos/expediente/%s/datosmenor/tinitialt27testadot estado__idit municipiotmunicipio__estado__idt localidads wizard.htmltformtformMovimientot formDocumentot formDomicilioRRRRRRRRRRRRRRR R!R"R#R$tcontext_instance(*tmethodt MenorFormR)tMovimientoMenorFormtgetlistt DocMenorFormt DomicilioFormtis_validtsaveR0R<R9R:R>tEstatustCatalogoTipoMovimientotdatetimetnowtyeart ExpedientetstrREtFalseR+t domiciliot ExceptionRAt expedienteRFR7ttipo_movimientotsave_m2mRtsuccessR.t MunicipioR;tfieldstquerysett Localidadtrender_to_responsetRequestContext(RRRRSRARTRURFtusuarioR7RGttipotfechatanioRit movimientotxteRgt documento((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pyt pre_registrohsj'                     cCstiid|}|iiddidd i}|idjowt|id|}t |i}|i oB|i |i o#|i }||_ |i nt dSntd|}|i ot d h|i iiiid 6|i iiid 6|i iid 6|i id 6}tiid|i iiii|id _tiid|i iiii|id _nd}tdh|d6|d6dt|S(NR<ttipo_movimiento__tipotIngresos-fechaiR)tinstances/expediente/listamenores/RKRMRORQtcoloniaRNRPseditar_menor.htmlRRtformDomRV(tMenorR:R>tmovimientomenor_setR;torder_byRWRXR)R\R]R^RgR.RQRORMR<RRmRnRoRpR+RqRr(Rtmenor_idRFRwt formMenorRUtdom((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pyt editar_menors((      2#.2c CsOyFtiid|dd<i}ti|d|itdSWntj o}y?tiid|ddi}ti|d tdSWqKtj o}t iid |}|i d joLt |i d |}t |i }|i id }t|i }t|i } |io|io|io| io|i}|ii} tiid| } tiidd} tiidd} tii}|i}tddd|d| }|it|idt||_|i|idt}y%|i d}|o d|_nWn*tj o}| i}||_nX|d|_||_ |i!|_!| |_"| |_#|i|idt}|i!|_!||_ |i|i$ti%|dtd|i!iSnvt d |}t }t}tdhdd6} t&iidd| i'd _(t)iid!d| i'd"_(t*d#h|d$6|d%6|d&6| d'6d(d)6d(d*6d(d+6d(d,6d(d-6d(d.6d(d/6d(d06d(d16d(d26d(d-6d3d46d(d56d(d66d(d76d(d86d(d96d(d:6d;t+|SXnXdS(=NRFtestatus__id__iniis=Ya existe un numero de Expediente: %s activo , con esos datoss/expediente/pre/t estatus__idis?El menor ya tiene un registro pendiente, falta crear expedienteR<R)R~RAR0RBRCtRIREs/2013RGRHRIRJisPre- Registro con éxitos/expediente/%s/datosmenor/RKRLRMRNiRORPRQs wizard.htmlRRRSRTRURRRRRRRRRRRRRRR R!R"R#R$RV(ii(,RdR:R;R>RR/RER.RhRRWRXR)RYRZR[R\R]R^R0R<R9R_R`RaRbRcReRfR+RgRARiRFR7RjRkRlRmRnRoRpRqRr(RRRiRyRFRRRSRARTRURsR7RGRtRuRvRwRxRgRz((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pyt menor_existes!!4                    cCsatiid|}tiidd}||_|iti|dtd|i i S(NR<isExpediente registrados/expediente/%s/datosmenorex/( RdR:R>R_RGR^RRlR.RFR<(Rt movimiento_idRiRG((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytcrea_expediente+s   cCsUtiid|}td|dt}|iti|dtd|i S(NR<RFttienes'Se ha Registrado ausencia de familiaress/expediente/%s/datosmenorex/( RR:R>tFamiliarAusentetTrueR^RRlR.R<(RRRFtnoTiene((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pyt no_familiares5s  cCstiid|}|idjo t|i}t|i}t|i}t|i}|i o|i o|i o|i o|i dt }||_ |i |ii d}tiidt|d} |ii d} |ii d} y&|ii d} t| d} Wntj o}d} nXy&|ii d }t|d}Wntj o}d}nXtd| d| dd| dd| d |}|i |i }|i dt }||_ ||_||_||_|i ti|d td |i iSnt}t}td hd d6}tiidd|id_tii|id_td hd d6}tiidd|id_tii|id_tdh|d6|d6|d6dd6|d6|d6dd6dd6dd6dd6dd6dd6dd 6dd!6dd"6dd6dd#6d$d%6dd&6dd'6dd(6dd)6dd*6d+t |S(,NR<R)RIRQiRtcalleREt codigo_postalsFamiliar registrados/expediente/%s/datosmenorex/RKRLRMRNiROsfamiliar_form.htmlRRtformdirRFRRRUtformDomicilio2RRRRRRRRRRRRR R!R"R#R$RV(!RR:R>RWt FamiliarFormR)tDireccionFamiliaresFormtDomicilioForm2tDomicilioForm3R]R^RfRFRZRptintRhR+t DomiciliotfamiliarRgtdomicilio_laboralRRlR.R<RmR;RnRotnoneRqRr(RRRFRRt dirFamiliarRURRt localidadest localidad1tcoloniastcallestnumerosRERytcptcodigoRgRt direccion((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytregistra_familiar<sf4    /         %cCsntiid|}tiid|ii}|idjo}t|i}|i o]|i dt }||_ ||_|i |i ti|dtd|iiSn t}tdh|d6|id6d d 6d d 6d d 6d d 6d d6d d6d d6d d6d d6d d6d d6d d6dd6d d6d d6d d6d d6d d6dt|S(NR<R)RIs" Documento del Familiar Registrados/expediente/%s/familia/sdocfamiliar_form.htmlRRRFRRRRRRRRRRRRRRR R!R"R#R$RV(tFamiliarR:R>RRFR<RWtDocFamiliarFormR)R]R^RfRRkRRlR.RqRr(Rt familiar_idRRFRRt docFamiliar((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytregistra_doc_familiar{s(      (cCstiidd}tdh|d6dd6dd6dd6dd 6dd 6dd 6dd 6dd 6dd6dd6dd 6dd6dd6dd6dd6dd6dd6dd6dt|S(Ntexpediente__estatus__idismenorTabla_expediente.htmltdatosRRRRRRRRRRRRRRR R!R"R#R$RV(tMovimientoMenorR:R;RqRr(RtmenoresPreregistrados((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytlista_preingresosscCstiiddd|}tiiddd|}tdh|d6|d6dd 6dd 6dd 6dd 6dd 6dd6dd6dd6dd6dd6dd 6dd6dd6dd6dd6dd6dd6dd6dt|S(NRiRFt menor__idsmenor_datos.htmlRtdocRRRRRRRRRRRRRRR R!R"R#R$RV(RR:R;tDocumentoMenorRqRr(RRRFt documentos((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytmuestra_datos_menors%cCsd}tiid|dd}tiid|}tiid|}tdh|d6|d6|d 6d d 6d d 6d d 6d d6d d6d d6d d6d d6d d6d d6d d6d d6dd6d d6d d6d d6d d6d d6dt|S(NiRFRiRismenor_datos.htmlRRtunoRRRRRRRRRRRRRRR R!R"R#R$RV(ii(RdR:R;RRRqRr(RRRRiRFR((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytmuestra_datos_expedientess,cCstiid|}tdh|d6|d6dd6dd6dd6dd6dd 6dd 6dd 6dd 6dd 6dd6dd 6dd6dd6dd6dd6dd6dd6dd6dt|S(NRFsfamiliar_list.htmlRRRRRRRRRRRRRRRR R!R"R#R$RV(RR:R;RqRr(RRt familiares((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytver_familiaress%cCstiid|dd}tiid|dd}tdh|d6|d6|d6d d 6d d 6d d 6d d 6d d6d d6d d6d d6d d6d d6d d6d d6dd6d d6d d6d d6d d6d d6dt|S(NRFtexpediente__estatus__iniiRsdocumento_list.htmlRRiRRRRRRRRRRRRRRR R!R"R#R$RV(ii(ii(RR:R;RdR>RqRr(RRRRi((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytver_documentos_menors,cCstiidd}tdh|d6dd6dd6dd 6dd 6dd 6dd 6dd 6dd6dd6dd6dd 6dd6dd6dd6dd6dd6dd6dd6dt|S(Ntexpediente__estatus__id__iniistabla_menores.htmlRRRRRRRRRRRRRRRR R!R"R#R$RV(ii(RR:R;RqRr(Rtmenores((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytver_menores_trabajosocialscCsQtiid|}tiid|}tdh|d6|d6dt|S(Ntexpediente__menor__idtexpediente__menor_idsmenor_datos.htmlRRRV(RR:R;RRqRr(RRtmenorPreR((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pythistorial_menorscCstiidddd}tdh|d6dd6dd 6dd 6dd 6dd 6dd 6dd6dd6dd6dd6dd 6dd6dd6dd6dd6dd6dd6dd6dt|S(NRitexpediente__fototstabla_foto.htmlRRRRRRRRRRRRRRR R!R"R#RR$RV(RR:R;RqRr(RR((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytver_menores_fotoscCsM|idjot|i|i}|ioit|id}tiid|dd}|id}||_ |i t i |dt dSn t}td h|d 6|d 6d d 6d d6d d6d d6d d6d d6d d6d d6d d6d d6d d6d d6d d6d d6d d6d d6d d6dd6dt|S( NR)t expediente_idRFRitfotosLa foto ha sido registradas/expediente/menoresfoto/s foto.htmlRRRiRRRRRRRRRRRRRR R!R"R#RR$RV(RWtfotoFormR)tFILESR]RRdR:R>RR^RRlR.RqRr(RRRRt idExpedienteRiR((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pyt sube_fotos$     %cCstiiddidd}tdh|d6dd 6dd 6dd 6dd 6dd 6dd6dd6dd6dd6dd6dd 6dd6dd6dd6dd6dd6dd6dd6dt|S(NRiiRRsmenores_foto_subida.htmlRRRRRRRRRRRRRRR R!R"R#RR$RV(ii(RR:R;texcludeRqRr(RR((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytver_foto_subida s!cCsBtiid|}d|_|iti|dtdS(NR<RsLa foto eliminadas/expediente/subida(RdR:R>RR^RRlR.(RRRi((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pyt elimina_fotos   cCs7tiid|dd"}|idjoQt|i|id|}|io%|it i |dt dSntd|}t d h|d 6|d 6d d 6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!t |S(#NRRiiR)R~sLa foto ha sido registradas/expediente/subidas foto.htmlRRRitEditarteditarRRRRRRRRRRRRRR R!R"R#RR$RV(ii(RdR:R>RWRR)RR]R^RRlR.RqRr(RRRiRR((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pyt edita_fotos  ,cCstii}tiiiddid|}tdh|d6dd6dd6dd 6dd 6dd 6dd 6dd 6dd6dd6dd6dd 6dd6dd6dd6dd6dd6dd6dd6dt|S(NRitexpediente__canaliza__instabla_canalizacion.htmlRRRRRRRRRRRRRRR R!RR"R#R$RV(R"R:tallRR;RRqRr(Rt canalizacionR((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytver_menores_canalizar8s'c Cs3|}tiid|}tiid|ii}|idjo6t|i}t |i}|i ot ii d|}|i GH|i djo|idt}|idt} tiidd} |ii} tiid| } | | _|| _|| _| | _| i| |_|iti|dtd Sti|d td Sqnt}t }td h|d 6|d 6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!t|S("NR<R)RiiRIiR0sCanalizacion registradas/index/sCanalizacion ya registradascanaliza_form.htmlRRtform2RRRRRRRRRRRRRR R!RR"R#R$RV(RdR:R>RRFR<RWt CanalizaFormR)tObservacionesFormR]R"R;tcountR^RfR_R0R9R7RiRGtcanalizaRRlR.R/RqRr( Rtid_menort id_expedienteRiRFRRRtcanaRARRGRsR7((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytregistra_canalizacionDsF             %cCstiiiddidd }tdh|d6dd 6dd 6dd 6dd 6dd 6dd6dd6dd6dd6dd6dd 6dd6dd6dd6dd6dd6dd6dd6dt|S(NRiis-fechaisultimas_canalizaciones.htmlRRRRRRRRRRRRRRR R!RR"R#R$RV(ii(R"R:RR;RRqRr(RR((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytultimas_canalizacionesps((t csrf_exemptc Cs|io|idjo d}q|idjod|id}|id}|id}tidtiiid|d |d |d d}qnt |ddS(NtGETtnopR)tnombretapellido_paternotapellido_maternotjsontnombre__iexacttapellido_paterno__iexacttapellido_materno__iexactRnR<tfecha_nacimientotedadtsexotlugar_nacimientotmimetypesapplication/javascript(sidsnombresapellido_paternoRRRRR( tis_ajaxRWR)Rt serializeRR:RR;t HttpResponse(RR/Rt apellido_pt apellido_mRF((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytverificarMenors     AcCs|iol|idjo d}qv|idjo>|id}tidtiid|dtdd }qvnt |d d S( NRRR)RRRttutorRnR<Rsapplication/javascript( RRWR)RRRR:R;RR(RR/RRF((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytverificarTutors   5cCswtiid|}tiid|i}|ii}|idjot|i }|i o`|i dt }|i|_||_ |i |iti|dtd|iiSn t}tdh|d6|d6d d 6d d 6d d 6d d 6d d6d d6d d6d d6d d6d d6d d6d d6dd6d d6d d6d d6d d6d d6dt|S(NR<RFR)RIs-Los Documentos del menor han sido registradoss/expediente/%s/datosmenorex/sdocmenor_form.htmlRRRRRRRRRRRRRRRRR R!R"R#R$RV(RdR:R>RR;RFR<RWR[R)R]R^RfRiRkRRlR.RqRr(RRRitmenorDocRFRRtdocMenor((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytregistra_doc_menor2s*       %cCs|idjoGt|i}|io'|i}ti|dtdSn t}tdh|d6dt |S(NR)s+El Parentesco a Sido Guardado Correctamentes/expediente/addParentesco/sregistro_parentesco.htmlRRRV( RWtCatalogoParentescoFormR)R]R^RRlR.RqRr(RtformRegistroParentescotRegistroParentesco((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pyt addParentescos   c Cs|}tiid|}|idjoqt|id|}y*|i}ti|dt dSWqt j o}d}ti ||qXntd|}t dh|d6d d 6d t |S( NRBR)R~s'El Parentesco se Modifico Correctamentes/expediente/updateParentesco/s"No se pudo modificar el parentescosregistro_parentesco.htmlRRt1tvarRV(t ParentescoR:R>RWRR)R^RRlR.RhR/RqRr(Rt parentesco_idtdatotiRRtaRytmsj((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytcambiarParentescos cCs/tii}tdh|d6dt|S(Nsconsulta_parentesco.htmlRRV(RR:RRqRr(Rt resultado((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytupdateParentescoscCs}|idjoGt|i}|io'|i}ti|dtdSnt}tdh|d6dt |S(NR)s$El Documento se Guardo Correctamentes/expediente/addDocumentos/sregistro_Documentos.htmlRRRV( RWtCatalogodocumentosFormR)R]R^RRlR.RqRr(RRRtRegisDocumento((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pyt addDocumentoss  cCs8tiiid}tdh|d6dt|S(Ns-idsconsulta_Documentos.htmlRRV(t DocumentoR:RRRqRr(RR ((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytconsultarDocumentossc Cs|idjo|}tiid|}t|id|}y*|i}ti|dt dSWqt j o}d}ti ||qXn t}t dh|d6d d 6d t |S( NR)RBR~s2El Estatus del Documento se Modifico Correctamentes /expediente/consultarDocumentos/sSeleccione una opcion validasregistro_Documentos.htmlRRRRRV(RWRR:R>t DocumentoFormR)R^RRlR.RhR/RqRr(Rt documento_idRRRRRRyR((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytcambiarDocumentos  s/login/c CsV|idjot|i}t|i}|id}|id}|GH|io|io|djp|djp |djodGH|i}|i}tii d|}|id t }t ii d d } ||_ | |_ |it|i_|ii|i|_|i|_|iy9tii d |ii} | ii|| iWntj o } nXti|d tdSdGH|i|it |i_|iiti|dtdSq nt}t}h|d6|d6dd6dd6dd6dd6} td| dt|S(NR)t organismoR?Rt2t3t entroaquiRBRIR<itnamesUsuario Registrados/expediente/registrarEmpleado/tnoentrosEmpleado Registradot formularioRRRRR!RRsregistro_usuario.htmlRV(RWRR)t EmpleadoFormR]R^R<RR:R>RfR_R0RGRR~R,Rt first_nameRt last_nameRR?tuser_settaddRhRRlR.RqRr( RRtdatos_empleadoRR?tregistrotultimoRtguardarRGtgrupoRytcontexto((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytregistrarEmpleadosT  '                 cCs|idjoGt|i}|io'|i}ti|dtdSn t}tdh|d6dt |S(NR)sRegistro Guardado Correctamentes/expediente/capturarOrganismos/sregistro_organismo.htmlRRRV( RWtOrganismosFormR)R]R^RRlR.RqRr(RRRR ((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytcapturarOrganismos<s   cCs8tiiid}tdh|d6dt|S(Ns-idsconsultar_organismos.htmlRRV(t OrganismoR:RRRqRr(RR ((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytconsultarOrganismosJsc Cs|idjo|}tiid|}t|id|}y*|i}ti|dt dSWqt j o}d}ti ||qXn t}t dh|d6d d 6d t |S( NR)RBR~s2El Estatus del Organismo se Modifico Correctamentes /expediente/consultarOrganismos/sSeleccione una opcion validasregistro_organismo.htmlRRRRRV(RWR)R:R>tconsultarOrganismoFormR)R^RRlR.RhR/RqRr(Rt organismo_idRRRRRRyR((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytcambiarOrganismosQs  cCs|idjoGt|i}|io'|i}ti|dtdSn t}tdh|d6dt |S(NR)sRegistro Guardado Correctamentes/expediente/capturarAreas/sregistro_areas.htmlRRRV( RWt AreasFormR)R]R^RRlR.RqRr(RRRR ((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pyt capturarAreasgs   cCs8tiiid}tdh|d6dt|S(Ns-idsconsultarAreas.htmlRRV(R=R:RRRqRr(RR ((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytconsultarAreastsc Cs|idjo|}tiid|}t|id|}y*|i}ti|dt dSWqt j o}d}ti ||qXn t}t dh|d6d d 6d t |S( NR)RBR~s-El Estatus del Area se Modifico Correctamentes/expediente/consultarAreas/sSeleccione una opcion validasregistro_areas.htmlRRRRRV(RWR=R:R>tconsultarAreaFormR)R^RRlR.RhR/RqRr(Rtarea_idRRRRRRyR((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pyt cambiarArea{s  c Cstiid|}y0tiid|}|otiid|}tiid|}tiid|}tiid|}t iid|}t iid|} t iid|i d} | iddi } ntdh |d6|d6|d 6|d 6| d 6|d 6|d 6| d6| d6dt|SWnEtj o9} ti|dtdh|id6dt|SXdS(NR<RiRRisprueba_tabs.htmlRt psicologiat pedagogiatmedicotevasiontsocialtjuridicotsalidat nutricionRVsEl menor no ha sido canalizadoRF(RdR:R>R"RR;RRRR RtEvasionRRRqRrRhRR/RF( Rt canaliza_idRiRR4R5R6R8R9R;R7t evasionTrueRy((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytconsultarMenors&cCs]tiid|}tiid|}|o(tdh|d6|d6dt|SdS(NR<Rismenor_egresar.htmlRtmotivoRV(RdR:R>RRqRr(RRRitmov((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytmostrarMenorEgresars  cCs|iol|idjo d}qy|idjo>|id}tidtiiid|dd }qynt |d d S( NRseste se envio via getR)t id_estadoRRMRnR<RRsapplication/javascript(sidsnombre( RRWR)RRRmR:RR;R(RtrespuestRCtpartidas((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytconsultarMunicipios   5cCs|iol|idjo d}qy|idjo>|id}tidtiiid|dd }qynt |d d S( NRseste se envio via getR)t id_municipioRRORnR<RRsapplication/javascript(sidsnombre( RRWR)RRRpR:RR;R(RRDRGRE((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytconsultarLocalidads   5cCstiidd}tdh|d6dd6dd6dd6dd 6dd 6dd 6dd 6dd 6dd6dd6dd 6dd6dd6dd6dd6dd6dd6dd6dd6dt|S(NRisevadir_tabla.htmlRRRRRRRRRRRRRRRR R!R"R#R$R<RV(RR:R;RqRr(RR((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytver_menores_evadirsc Cstiid|}tiid|ii}|idjot|i}|i o|i dt }t iidd}t iidd}|ii}tiid|} ||_||_| |_||_||_|i ||_|i ti|dtd Sn t}td h|d 6|d 6d d6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6d d 6d!d"6d#t|S($NR<R)RIiRCtEVR0s&Se ha registrado la evasión del menors/index/sexpediente_form.htmlRRRisEgreso del MenorR?RRRRRRRRRRRRR R!R"R#R$tegresoRR7RV(RdR:R>RRFR<RWt EvasionFormR)R]R^RfR_R`R0R9RiR7RGRjRRlR.RqRr( RRRiRFRRR7RGRtRsR7((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytmovimiento_evasions8           %c Cs!tiid|}tiid|ii}|idjo%t|i}|i o|i dt }t iidd}t iidd}t iidd}|ii} tiid| } ||_||_| |_||_||_|i ||_|i tiid |d d } || _| i ti|d td Sn t}tdh|d6|d 6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6dd!6d"d#6dd$6d%d%6d&t|S('NR<R)RIiiRCtERR0RiRis&Se ha registrado el regreso del menors/index/sexpediente_form.htmlRRsEgreso del MenorR?RRRRRRRRRRRRRR R!R"RR#R$RKRV(RdR:R>RRFR<RWRLR)R]R^RfR_R`R0R9RiR7RGRjR<RRlR.RqRr( RRRiRFRRR7RGtestatusExpedienteRtRsR7t evasionSalida((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytmovimiento_evasion_regresos@             %cCstiidd}tdhdd6|d6dd6dd6dd 6dd 6dd 6dd 6dd 6dd6dd 6dd6dd6dd6dd6dd6dd6dd6dd6dd6dt|S(NRistabla_evasion.htmlRRRRRRRRRRRRRR R!R"R#R$RKRR<RV(R<R:R;RqRr(RtmenoresEvasion((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pyt lista_evasion$st JasperMixcBs,eZeiZdZdZhddZRS(t jasperadmincCslt|i|i|i}|i||pdn||}t|d}|i|d|idS(s Gennara reportes atravez del jasperserver :param path: :param namefile: :param params: :param tipo: default is PDF tPDFtwtdataN(RturlR'R(t runReporttfiletwritetclose(tselftpathtnamefiletparamsRttjtrettf((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pytgenerateReport6s #N( t__name__t __module__tsettingst JASPERSERVERRYR'R(R+Re(((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pyRT1s t ReporteTotalcBseZdZRS(cOsttii}y#|idtid|dWnOtj oC}h}t|dGs#   (RfRgR>(((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pyRjEst ReporteAreascBseZdZRS(c Os|id}yHttii}|idtid|dht|d6Wntj o}|GHnXt d|dS(NR?s/albergue/reportes_areass/impresiones/areass.pdfs/media/impresiones/areas( R>ReRaRbReRhRmRRhR.(R^RRoRpR2RBRy((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pyR>]s3 (RfRgR>(((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pyRr[stimprimirrecepcioncBseZdZRS(cOs$d}dt|d}t|S(Ni shttp://10.2.8.36/jasperserver/flow.html?_flowId=viewReportFlow&standAlone=true&ParentFolderUri=%2Falbergue&reportUnit=%2Falbergue%2Falbergue&j_username=jasperadmin&j_password=jasperadmin&area=s &output=pdf(ReR.(R^RRotkwargstridRY((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pyR>vs(RfRgR>(((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pyRsts(]t django.httptdjango.template.responsetdjango.contrib.authtdjango.contrib.auth.decoratorstexpediente.modelstdjango.shortcutstdjango.contrib.auth.modelsRtexpediente.formsRatdjango.contribRtdjango.db.modelst django.utilsRRRRt django.coreRtdjango.contrib.auth.formsRRtdjango.utils.htmlR R tdjango.core.exceptionsR R R RtpyjasperclientRtdjango.views.genericRR&R1R4R@R{RRRRRRRRRRRRRRRRRRRRRtdjango.views.decorators.csrfRRRRRR R RRRR&R(R*R-R/R0R3R?RBRFRHRIRMRQRStobjectRTtViewRjRrRs(((s</opt/public_html/NoBorrar/casa-del-arbol/expediente/views.pyts               "G . N ?       ,   4     $(