- Fecha y hora:
- 19/08/2016 14:35:55 (hace 8 años)
- Branches:
- master, carga
- Children:
- 57d8390
- Parents:
- e33709d
- Fichero:
-
- 1 editado
Leyenda
- No modificado
- Añadido
- Eliminado
-
base/models.py
r3e336b1 rf85582e 1 """ 2 Sistema Estadístico Integral de Venezuela - (SEIVEN) 3 4 Copyleft (@) 2015 CENDITEL nodo Mérida - https://mpv.cenditel.gob.ve/seiven 5 """ 6 ## @namespace base.models 7 # 8 # Contiene las clases, atributos y métodos para el modelo de datos de usuario 9 # @author Ing. Roldan Vargas (rvargas at cenditel.gob.ve) 10 # @author <a href='http://www.cenditel.gob.ve'>Centro Nacional de Desarrollo e Investigación en Tecnologías Libres 11 # (CENDITEL) nodo Mérida - Venezuela</a> 12 # @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> 13 from __future__ import unicode_literals 14 from django.contrib.auth.models import User 15 from django.core import validators 1 16 from django.db import models 17 from django.utils import six 18 from django.utils.encoding import python_2_unicode_compatible 19 from django.utils.translation import ugettext_lazy as _ 2 20 3 # Create your models here. 21 22 @python_2_unicode_compatible 23 class Institucion(models.Model): 24 """! 25 Clase que gestiona los datos de las instituciones 26 27 @author Ing. Roldan Vargas (rvargas at cenditel.gob.ve) 28 @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> 29 @date 19-08-2016 30 @version 1.0.0 31 """ 32 33 ## Contiene el nombre de la institución 34 nombre = models.CharField(max_length=75) 35 36 ## Contiene una descripción sobre la institución 37 descripcion = models.CharField(max_length=255) 38 39 class Meta: 40 """! 41 Metaclase que permite establecer las propiedades de la clase Institucion 42 43 @author Ing. Roldan Vargas rvargas at cenditel.gob.ve 44 @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> 45 @date 19-08-2016 46 @version 1.0.0 47 """ 48 verbose_name = _("Institución") 49 verbose_name_plural = _("Instituciones") 50 ordering = ("nombre",) 51 52 def __str__(self): 53 """! 54 Método que muestra la información sobre la institución 55 56 @author Ing. Roldan Vargas (rvargas at cenditel.gob.ve) 57 @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> 58 @date 19-08-2016 59 @param self <b>{object}</b> Objeto que instancia la clase 60 @return Devuelve los datos de la institución 61 """ 62 return "%s" % six.text_type(self.nombre) 63 64 65 @python_2_unicode_compatible 66 class Ocupacion(models.Model): 67 """! 68 Clase que gestiona los datos de las ocupaciones 69 70 @author Ing. Roldan Vargas (rvargas at cenditel.gob.ve) 71 @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> 72 @date 19-08-2016 73 @version 1.0.0 74 """ 75 76 ## Contiene el nombre de la ocupación 77 nombre = models.CharField(max_length=75) 78 79 ## Contiene una descripción sobre la ocupación 80 descripcion = models.CharField(max_length=255) 81 82 class Meta: 83 """! 84 Metaclase que permite establecer las propiedades de la clase Ocupacion 85 86 @author Ing. Roldan Vargas rvargas at cenditel.gob.ve 87 @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> 88 @date 19-08-2016 89 @version 1.0.0 90 """ 91 verbose_name = _("Ocupación") 92 verbose_name_plural = _("Ocupaciones") 93 ordering = ("nombre",) 94 95 def __str__(self): 96 """! 97 Método que muestra la información sobre la ocupación 98 99 @author Ing. Roldan Vargas (rvargas at cenditel.gob.ve) 100 @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> 101 @date 19-08-2016 102 @param self <b>{object}</b> Objeto que instancia la clase 103 @return Devuelve los datos de la ocupación 104 """ 105 return "%s" % six.text_type(self.nombre)
Nota: Vea TracChangeset
para ayuda en el uso del visor de conjuntos de cambios.