Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for anuncio in anuncios:
- data = {}
- data['id'] = anuncio['id'],
- data['manifestado'] = anuncio['numero_de_manifiesto'],
- data['nave'] = anuncio['nave__nombre'],
- data['tipo_nave'] = anuncio['tipo_nave__descripcion'],
- data['nombre_linea'] = anuncio['linea_naviera__nombre'],
- data['nro_viaje'] = anuncio['nro_viaje'],
- data['agente_maritimo'] = anuncio['agente_maritimo__nombre'],
- data['eslora'] = anuncio['nave__eslora'],
- data['eta'] = anuncio['eta'],
- data['etb'] = anuncio['etb'],
- data['etc'] = anuncio['etc'],
- data['etd'] = anuncio['etd'],
- data['carga'] = anuncio['carga'].upper()
- data['proyecto_articulo'] = anuncio['proyecto_articulo__nombre']
- # data['amarradero'] = anuncio['amarradero__nombre']
- data['reporte_servicio_url'] = reverse('reporte_servicio', kwargs={"pk": anuncio['id']})
- data['atraque_url'] = reverse('acta_maniobra_imprimir', kwargs={"pk": atra[anuncio['id']]}) if anuncio['id'] in atra else None
- data['desatraque_url'] = reverse('acta_maniobra_imprimir', kwargs={"pk": desa[anuncio['id']]}) if anuncio['id'] in desa else None
- data['foto'] = anuncio['tipo_nave__foto'],
- resultado.append(data)
- columns: [
- {
- data: "foto",
- },
- {data: "manifestado"},
- {data: "nave"},
- {data: "tipo_nave"},
- {data: "nombre_linea"},
- {data: "nro_viaje"},
- {data: "agente_maritimo"},
- {data: "eslora"},
- {data: "eta"},
- {data: "etb"},
- {data: "etc"},
- {data: "etd"},
- {data: "carga"},
- {data: "proyecto_articulo"},
- {
- "targets": -1,
- "data": null,
- "defaultContent": "<i class="fa fa-eye" aria-hidden="true"></i>",
- "className": 'anuncio'
- },
- {
- "targets": -1,
- "data": null,
- "defaultContent": "<i class="fa fa-eye" aria-hidden="true"></i>",
- "className": 'atraque'
- },
- {
- "targets": -1,
- "data": null,
- "defaultContent": "<i class="fa fa-eye" aria-hidden="true"></i>",
- "className": 'desatraque'
- }
- ],
Add Comment
Please, Sign In to add comment