[2e5b1d0] | 1 | from django.db import models |
---|
| 2 | |
---|
| 3 | |
---|
| 4 | class Pais(models.Model): |
---|
| 5 | """! |
---|
| 6 | Clase que contiene los paÃses |
---|
| 7 | |
---|
| 8 | @author Ing. Roldan Vargas (rvargas at cenditel.gob.ve) |
---|
| 9 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 10 | @date 10-05-2016 |
---|
| 11 | @version 2.0.0 |
---|
| 12 | """ |
---|
| 13 | |
---|
| 14 | ## Nombre del pais |
---|
| 15 | nombre = models.CharField(max_length=50) |
---|
| 16 | |
---|
| 17 | def __str__(self): |
---|
| 18 | """! |
---|
| 19 | Método que muestra la información sobre el Pais |
---|
| 20 | |
---|
| 21 | @author Ing. Roldan Vargas (rvargas at cenditel.gob.ve) |
---|
| 22 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 23 | @date 29-06-2016 |
---|
| 24 | @param self <b>{object}</b> Objeto que instancia la clase |
---|
| 25 | @return Devuelve los datos del Pais |
---|
| 26 | """ |
---|
| 27 | return self.nombre |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | |
---|
| 31 | class Estado(models.Model): |
---|
| 32 | """! |
---|
| 33 | Clase que contiene los Estados de un Pais |
---|
| 34 | |
---|
| 35 | @author Ing. Roldan Vargas (rvargas at cenditel.gob.ve) |
---|
| 36 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 37 | @date 10-05-2016 |
---|
| 38 | @version 2.0.0 |
---|
| 39 | """ |
---|
| 40 | |
---|
| 41 | ## Nombre del Estado |
---|
| 42 | nombre = models.CharField(max_length=50) |
---|
| 43 | |
---|
| 44 | ## Pais en donde esta ubicado el Estado |
---|
| 45 | pais = models.ForeignKey(Pais) |
---|
| 46 | |
---|
[0391bfa] | 47 | |
---|
[2e5b1d0] | 48 | def __str__(self): |
---|
| 49 | """! |
---|
| 50 | Método que muestra la información sobre el Estado |
---|
| 51 | |
---|
| 52 | @author Ing. Roldan Vargas (rvargas at cenditel.gob.ve) |
---|
| 53 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 54 | @date 29-06-2016 |
---|
| 55 | @param self <b>{object}</b> Objeto que instancia la clase |
---|
| 56 | @return Devuelve los datos del Estado |
---|
| 57 | """ |
---|
| 58 | return self.nombre |
---|
| 59 | |
---|
| 60 | |
---|
| 61 | class Municipio(models.Model): |
---|
| 62 | """! |
---|
| 63 | Clase que contiene los Municipios de un Estado |
---|
| 64 | |
---|
| 65 | @author Ing. Roldan Vargas (rvargas at cenditel.gob.ve) |
---|
| 66 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 67 | @date 10-05-2016 |
---|
| 68 | @version 2.0.0 |
---|
| 69 | """ |
---|
| 70 | |
---|
| 71 | ## Nombre del Municipio |
---|
| 72 | nombre = models.CharField(max_length=50) |
---|
| 73 | |
---|
| 74 | ## Estado en donde se encuentra el Municipio |
---|
| 75 | estado = models.ForeignKey(Estado) |
---|
| 76 | |
---|
| 77 | def __str__(self): |
---|
| 78 | """! |
---|
| 79 | Método que muestra la información sobre el Municipio |
---|
| 80 | |
---|
| 81 | @author Ing. Roldan Vargas (rvargas at cenditel.gob.ve) |
---|
| 82 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 83 | @date 29-06-2016 |
---|
| 84 | @param self <b>{object}</b> Objeto que instancia la clase |
---|
| 85 | @return Devuelve los datos del Municipio |
---|
| 86 | """ |
---|
| 87 | return self.nombre |
---|
| 88 | |
---|
| 89 | |
---|
| 90 | class Parroquia(models.Model): |
---|
| 91 | """! |
---|
| 92 | Clase que contiene las parroquias de un Municipio |
---|
| 93 | |
---|
| 94 | @author Ing. Roldan Vargas (rvargas at cenditel.gob.ve) |
---|
| 95 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 96 | @date 10-05-2016 |
---|
| 97 | @version 2.0.0 |
---|
| 98 | """ |
---|
| 99 | |
---|
| 100 | ## Nombre de la Parroquia |
---|
| 101 | nombre = models.CharField(max_length=50) |
---|
| 102 | |
---|
| 103 | ## Municipio en el que se encuentra ubicada la Parroquia |
---|
| 104 | municipio = models.ForeignKey(Municipio) |
---|
| 105 | |
---|
| 106 | def __str__(self): |
---|
| 107 | """! |
---|
| 108 | Método que muestra la información sobre la Parroquia |
---|
| 109 | |
---|
| 110 | @author Ing. Roldan Vargas (rvargas at cenditel.gob.ve) |
---|
| 111 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 112 | @date 29-06-2016 |
---|
| 113 | @param self <b>{object}</b> Objeto que instancia la clase |
---|
| 114 | @return Devuelve los datos de la Parroquia |
---|
| 115 | """ |
---|
| 116 | return self.nombre |
---|
| 117 | |
---|
| 118 | |
---|
[4d1e7d5] | 119 | class TipoDocumento(models.Model): |
---|
| 120 | """! |
---|
| 121 | Clase que contiene el tipo de documento |
---|
| 122 | |
---|
| 123 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
| 124 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 125 | @date 25-05-2017 |
---|
| 126 | @version 1.0.0 |
---|
| 127 | """ |
---|
| 128 | abreviatura = models.CharField(max_length=4, verbose_name='Acrónimo') |
---|
| 129 | descripcion = models.TextField() |
---|
| 130 | |
---|
| 131 | class Meta: |
---|
| 132 | ordering = ('abreviatura',) |
---|
| 133 | verbose_name = 'Tipo Documento' |
---|
| 134 | verbose_name_plural = 'Tipos Documentos' |
---|
| 135 | |
---|
| 136 | def __str__(self): |
---|
| 137 | return self.abreviatura |
---|
| 138 | |
---|
| 139 | |
---|
| 140 | class Institucion(models.Model): |
---|
| 141 | """! |
---|
| 142 | Clase que contiene Las instituciones |
---|
| 143 | |
---|
| 144 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
| 145 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 146 | @date 25-05-2017 |
---|
| 147 | @version 1.0.0 |
---|
| 148 | """ |
---|
| 149 | nombre = models.CharField(max_length=255) |
---|
| 150 | |
---|
| 151 | class Meta: |
---|
| 152 | ordering = ('nombre',) |
---|
| 153 | verbose_name = 'Institucion' |
---|
| 154 | verbose_name_plural = 'Instituciones' |
---|
| 155 | |
---|
| 156 | def __str__(self): |
---|
| 157 | return self.nombre |
---|
| 158 | |
---|
| 159 | |
---|
| 160 | class TipoCargo(models.Model): |
---|
| 161 | """! |
---|
| 162 | Clase que contiene el tipo de cargo del usuario |
---|
| 163 | |
---|
| 164 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
| 165 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 166 | @date 25-05-2017 |
---|
| 167 | @version 1.0.0 |
---|
| 168 | """ |
---|
| 169 | nombre = models.CharField(max_length=120) |
---|
| 170 | |
---|
| 171 | class Meta: |
---|
| 172 | ordering = ('nombre',) |
---|
| 173 | verbose_name = 'Cargo' |
---|
| 174 | verbose_name_plural = 'Cargos' |
---|
| 175 | |
---|
| 176 | def __str__(self): |
---|
| 177 | return self.nombre |
---|