Conjunto 02683ad en seiven
- Fecha y hora:
- 09/05/2017 10:18:00 (hace 7 años)
- Branches:
- master, carga
- Children:
- d7dac49
- Parents:
- 3608aa6
- Ficheros:
-
- 1 añadido
- 5 editados
Leyenda
- No modificado
- Añadido
- Eliminado
-
base/constant.py
re50220a r02683ad 15 15 from django.conf import settings 16 16 from django.utils.translation import ugettext_lazy as _ 17 from datetime import datetime 17 18 18 19 … … 231 232 ("IS",_("Importaciones de Servicios")), 232 233 ) 234 235 ## Años de consulta 236 ANHOS_CONSULTA = [(str(y), str(y)) for y in range(2009, datetime.now().year + 1)] 237 ANHOS_CONSULTA.insert(0, ('', "Seleccione")) -
base/models.py
r3f23f4b r02683ad 61 61 """ 62 62 return "%s" % six.text_type(self.nombre) 63 64 65 @python_2_unicode_compatible 66 class Estado(models.Model): 67 """! 68 Clase que contiene los Estados de un Pais 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 10-05-2016 73 @version 2.0.0 74 """ 75 76 ## Nombre del Estado 77 nombre = models.CharField(max_length=50) 78 79 def __str__(self): 80 """! 81 Método que muestra la información sobre el Estado 82 83 @author Ing. Roldan Vargas (rvargas at cenditel.gob.ve) 84 @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> 85 @date 29-06-2016 86 @param self <b>{object}</b> Objeto que instancia la clase 87 @return Devuelve los datos del Estado 88 """ 89 return self.nombre -
productivo/forms.py
rb85c099 r02683ad 13 13 from __future__ import unicode_literals 14 14 15 from django.forms import ChoiceField, CharField, Select, TextInput 15 from django.forms import ChoiceField, CharField, Select, TextInput, ModelChoiceField 16 16 from django.utils.encoding import python_2_unicode_compatible 17 17 from django.utils.translation import ugettext_lazy as _ 18 18 from django import forms 19 20 from base.constant import ANHOS_CONSULTA 21 from base.models import Estado 19 22 20 23 … … 32 35 ## Año de consulta 33 36 anho = ChoiceField( 34 label=_(u"Año"), choices= (('2017', '2017'),),37 label=_(u"Año"), choices=ANHOS_CONSULTA, 35 38 widget=Select(attrs={ 36 'class': 'select2 select2-offscreen form-control ', 'data-toggle': 'tooltip',39 'class': 'select2 select2-offscreen form-control select-anho', 'data-toggle': 'tooltip', 37 40 'title': _(u"Seleccione el año de consulta") 38 41 }) … … 47 50 }), required=False) 48 51 49 estado = ChoiceField(50 label=_(u"Estado"), choices=(),52 estado = ModelChoiceField( 53 label=_(u"Estado"), queryset=Estado.objects.all(), empty_label=_("Seleccione"), 51 54 widget=Select(attrs={ 52 55 'class': 'select2 select2-offscreen form-control', 'data-toggle': 'tooltip', -
productivo/templates/productivo.unidad.economica.html
rb85c099 r02683ad 74 74 </div> 75 75 <div class="row"> 76 <div class="col-md-6 text-center">77 <button type="button" class="btn btn-warning">{% trans ' Consultar' %}</button>76 <div class="col-md-6 col-xs-6 text-center"> 77 <button type="button" class="btn btn-warning">{% trans 'Buscar' %}</button> 78 78 </div> 79 <div class="col-md-6 text-center">79 <div class="col-md-6 col-sx-6 text-center"> 80 80 <button type="reset" class="btn btn-warning">{% trans 'Limpiar' %}</button> 81 81 </div> … … 102 102 <tr> 103 103 <th class="col-md-1"> 104 <input type="checkbox" id="check_all" role="button"> 104 <input type="checkbox" id="check_all" role="button" data-toggle="tooltip" 105 title="{% trans 'Marque para seleccionar todos los registros' %}"> 105 106 </th> 106 107 <th class="col-md-4">{% trans 'Nombre' %}</th> … … 113 114 </div> 114 115 </div> 116 <div class="row separador-row"> 117 <div class="col-md-12 text-right"> 118 <button type="button" class="btn btn-warning">{% trans 'Siguiente' %}</button> 119 </div> 120 </div> 115 121 </div> 116 122 </form> -
static/css/app.css
rb85c099 r02683ad 298 298 299 299 300 .select 2-container{301 min-width: 85px;300 .select-anho { 301 min-width: 120px; 302 302 } 303 303
Nota: Vea TracChangeset
para ayuda en el uso del visor de conjuntos de cambios.