Conjunto de cambios fc268ed en seiven para gestion_informacion
- Fecha y hora:
- 06/12/2016 17:06:28 (hace 7 años)
- Branches:
- master, carga
- Children:
- 34f3fd8
- Parents:
- 862cf76
- Fichero:
-
- 1 editado
Leyenda
- No modificado
- Añadido
- Eliminado
-
gestion_informacion/ajax.py
r8d3bd9a rfc268ed 55 55 mod = request.GET.get('mod', None) 56 56 57 filter = request.GET.get('filter', None) 58 59 if filter: 60 filter = json.loads(filter) 61 57 62 if app and mod: 58 63 modelo = apps.get_model(app, mod) … … 60 65 sheet = workbook.add_sheet("Datos") 61 66 instance = modelo() 62 datos = instance.gestion_init( )67 datos = instance.gestion_init(**filter) 63 68 font_bold = xlwt.easyxf('font: bold 1') 64 69 70 if datos['cabecera'][0]: 71 c = 0 72 73 for cabecera in datos['cabecera'][0]: 74 style = font_bold 75 if cabecera['color'] and cabecera['text_color']: 76 style = xlwt.easyxf('pattern: pattern solid, fore_colour %s; font: color %s, bold True; align: horiz center;' % (cabecera['color'], cabecera['text_color'])) 77 if cabecera['combine'] > 0: 78 count_merge = c + cabecera['combine'] 79 sheet.write_merge(0, 0, c, count_merge, cabecera['tag'], style) 80 c = count_merge + 1 81 else: 82 sheet.write(0, c, cabecera['tag'], style) 83 sheet.col(c).width = 357 * (len(cabecera['tag']) + 1) 84 c += 1 85 65 86 i = 0 66 for cabecera in datos['cabecera'] :67 sheet.write( 0, i, cabecera['label'], font_bold)87 for cabecera in datos['cabecera'][1]: 88 sheet.write(1, i, cabecera['label'], font_bold) 68 89 sheet.col(i).width = 256 * (len(cabecera['label']) + 1) 69 90 i += 1
Nota: Vea TracChangeset
para ayuda en el uso del visor de conjuntos de cambios.