Professional Documents
Culture Documents
doctype html>
{% load static %}
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Inicio - Mi Oficina</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" type="image/png" href="{% static 'assets/images/icon/favicon.ico'
%}">
<link rel="stylesheet" href="{% static 'assets/css/bootstrap.min.css' %}">
<link rel="stylesheet" href="{% static 'assets/css/font-awesome.min.css' %}">
<link rel="stylesheet" href="{% static 'assets/css/themify-icons.css' %}">
<link rel="stylesheet" href="{% static 'assets/css/metisMenu.css' %}">
<link rel="stylesheet" href="{% static 'assets/css/owl.carousel.min.css' %}">
<link rel="stylesheet" href="{% static 'assets/css/slicknav.min.css' %}">
<!-- amchart css -->
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css"
type="text/css" media="all"/>
<!-- others css -->
<link rel="stylesheet" href="{% static 'assets/css/typography.css' %}">
<link rel="stylesheet" href="{% static 'assets/css/default-css.css' %}">
<link rel="stylesheet" href="{% static 'assets/css/styles.css' %}">
<link rel="stylesheet" href="{% static 'assets/css/responsive.css' %}">
<link rel="stylesheet" href="{% static 'assets/css/select2.full.css' %}">
<link rel="stylesheet" href="{% static 'assets/sweet-alert2/sweetalert2.min.css' %} ">
{% block style %}
{% endblock %}
</head>
<body class="body-bg">
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a
href="http://browsehappy.com/">upgrade
your browser</a> to improve your experience.</p>
<![endif]-->
<!-- preloader area start -->
<div id="preloader">
<div class="loader"></div>
</div>
<!-- preloader area end -->
<!-- main wrapper start -->
<div class="horizontal-main-wrapper">
<!-- main header area start -->
{% include 'base_navbar_header.html' %}
<!-- main header area end -->
<!-- header area start -->
{% include 'base_navbar.html' %}
<!-- header area end -->
src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.25.0/codemirror.min.js"></script>
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.25.0/mode/xml/xml.min.js"></script>
{% block javascript %}
{% endblock %}
<script>
// Conexión para el socket
var idClient;
const socket = io('http://ujat.wvs.mx', {transports: ['websocket']})
socket.on('connect', () => {
idClient = '{{ request.user.persona_set.first.pk }}'
socket.emit('enviar-id', parseInt(idClient))
console.log('Entro connects---------')
console.log(idClient)
});
socket.on('disconnect', () => {
console.log('Se desconecto del servidor')
})
</script>
</body>
</html>
{% load static %}
<style>
.progress-bar-animated {
animation: progress-bar-stripes 15s linear infinite !important;
}
</style>
<div class="mainheader-area">
<div class="container">
<div class="row align-items-center">
<div class="col-md-3">
<div class="logo">
<a href="{% url 'catalogos:inicio' %}"><img src="{% static 'assets/images/logo.png'
%}"
alt="logo"></a>
</div>
</div>
<!-- profile info & task notification -->
<div class="col-md-9 clearfix text-right">
<div id="" class="d-md-inline-block d-block mr-md-4">
<ul class="notification-area">
{# <li id="full-view-exit"><i class="ti-zoom-out"></i></li>#}
<li class="dropdown">
<i class="ti-bell dropdown-toggle" onclick="loadNotificationUnread()"
data-toggle="dropdown">
<span id="spanCountNotification"></span>
</i>
<div class="dropdown-menu bell-notify-box notify-box">
<span class="notify-title"> Notificacion(es) <a
href="#">Ver todas</a></span>
<div class="nofity-list" id="notify-list">
<a href="#" class="notify-item">
<div class="notify-thumb"><i class="ti-key btn-danger"></i></div>
<div class="notify-text">
<p> Notificacion(es)</p>
<span>Just</span>
</div>
</a>
<a href="#" class="notify-item">
<div class="notify-thumb"><i class="ti-comments-smiley btn-
info"></i></div>
<div class="notify-text">
<p>New Commetns On Post</p>
<span>30 Seconds ago</span>
</div>
</a>
<a href="#" class="notify-item">
<div class="notify-thumb"><i class="ti-key btn-primary"></i></div>
<div class="notify-text">
<p>Some special like you</p>
<span>Just Now</span>
</div>
</a>
<a href="#" class="notify-item">
<div class="notify-thumb"><i class="ti-comments-smiley btn-
info"></i></div>
<div class="notify-text">
<p>New Commetns On Post</p>
<span>30 Seconds ago</span>
</div>
</a>
<a href="#" class="notify-item">
<div class="notify-thumb"><i class="ti-key btn-primary"></i></div>
<div class="notify-text">
<p>Some special like you</p>
<span>Just Now</span>
</div>
</a>
<a href="#" class="notify-item">
<div class="notify-thumb"><i class="ti-key btn-danger"></i></div>
<div class="notify-text">
<p>You have Changed Your Password</p>
<span>Just Now</span>
</div>
</a>
<a href="#" class="notify-item">
<div class="notify-thumb"><i class="ti-key btn-danger"></i></div>
<div class="notify-text">
<p>You have Changed Your Password</p>
<span>Just Now</span>
</div>
</a>
</div>
</div>
</li>
</ul>
</div>
<div class="clearfix d-md-inline-block d-block">
<div class="user-profile m-0">
{% if request.user.ctpersonas_set.first.perfil %}
<img src="{{ request.user.ctpersonas_set.first.perfil.url }}" alt="user-img"
class="avatar user-thumb">
{% else %}
<img src="{% static "assets/images/team/team-author2.jpg" %}" alt="user-img"
class="avatar user-thumb">
{% endif %}
{# <img class="avatar user-thumb" src="{% static
'assets/images/author/avatar.png' %}"#}
{# alt="avatar">#}
<h4 class="user-name dropdown-toggle" data-toggle="dropdown">{{ request.user
}}<i
class="fa fa-angle-down"></i></h4>
<div class="dropdown-menu">
<a class="dropdown-item" href="{% url 'catalogos:perfil' %}">Perfil</a>
<a class="dropdown-item" href="{% url 'logout' %}">Cerrar Sesión</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="http://ujat.wvs.mx/socket.io/socket.io.js"></script>
<script src="{% static 'assets/js/push-notifications/push.min.js' %}"></script>
<script src="{% static 'assets/js/vendor/jquery-2.2.4.min.js' %}"></script>
<script type="text/javascript">
var spanNotifications = document.getElementById('spanCountNotification')
$(document).ready(function () {
});
{#setInterval(function () {#}
{# $("#spanCountNotification").load(window.location.href + " #spanCountNotification");#}
{# }, 10000);#}
countNotifications()
setInterval('countNotifications()', 10000);
{# } else {#}
if (notificacion.solicitudFirma) {
console.log('This is firma')
notificaciones += `
<a href="/oficina/documento/firmar/${notificacion.solicitudFirma}/"
class="notify-item">
<div class="notify-thumb"><i class="ti-marker-alt btn-danger"></i></div>
<div class="notify-text text-center">
<p> ${notificacion.description}</p>
</div>
</a>
`
} else if (notificacion.data?.is_asignacion) {
console.log('This is asigna')
notificaciones += `
<a href="/oficina/agenda/" class="notify-item">
<div class="notify-thumb"><i class="ti-calendar btn-danger"></i></div>
<div class="notify-text text-center">
<p> ${notificacion.description}</p>
</div>
</a>
`
} else if (notificacion.data?.is_autorizado) {
notificaciones += `
<a href="/oficina/documento/autorizacion/${notificacion.data.documento}/"
class="notify-item" target="_blank">
<div class="notify-thumb"><i class="ti-eye btn-danger"></i></div>
<div class="notify-text text-center">
<p> ${notificacion.description}</p>
</div>
</a>
`
} else {
console.log('This is falso')
notificaciones += `
<a href="/oficina/documento/visualizar/${notificacion.cadena}/"
class="notify-item" target="_blank">
<div class="notify-thumb"><i class="ti-eye btn-danger"></i></div>
<div class="notify-text text-center">
<p> ${notificacion.description}</p>
</div>
</a>
`
}
{# }#}
});
content_div_notification.html(notificaciones)
} else {
content_div_notification.html(`
<a href="#" class="notify-item">
<div class="notify-thumb"><i class="ti-close ss btn-danger"></i></div>
<div class="notify-text">
<p> No se encontraron notificaciones</p>
<span>
<div class="progress">
<div class="progress-bar progress-bar-warning progress-bar-striped"
aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%"
role="progressbar"> </div>
</div>
</span>
</div>
</a>
`)
}
}
})
}
</script>
import base64
import io
import json
import smtplib
from datetime import datetime
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
class Index(TemplateView):
template_name = 'Inicio.html'
class FondoLGAListTemplateView(TemplateView):
template_name = 'LGA/fondo_lga.html'
except Exception as e:
print(e)
return JsonResponse({'message': 'Hubo un error al intentar crear el fondo'}, status=400)
except Exception as e:
print(e)
return JsonResponse({'message': 'Hubo un error al intentar crear el fondo'}, status=400)
except Exception as e:
print(e)
return JsonResponse({'message': 'Hubo un error al intentar eliminar el fondo'},
status=400)
class SeccionLGATemplateView(TemplateView):
template_name = 'LGA/seccion_lga.html'
except Exception as e:
print(e)
return JsonResponse({'message': 'Hubo un error al intentar crear la seccion'}, status=400)
except Exception as e:
print(e)
return JsonResponse({'message': 'Hubo un error al intentar crear el fondo'}, status=400)
except Exception as e:
print(e)
return JsonResponse({'message': 'Hubo un error al intentar eliminar la sección'},
status=400)
except Exception as e:
print(e)
return JsonResponse({'message': 'Hubo un error al intentar crear la serie'}, status=400)
class SeriesLGAEditApiView(APIView):
except Exception as e:
print(e)
return JsonResponse({'message': 'Hubo un error al intentar eliminar la serie'},
status=400)