Forum » Programiranje » sqlalchemy python
sqlalchemy python
![](https://static.slo-tech.com/stili/avatar_gray.gif)
detroit ::
Koda pastie.org/5851329
Kako bi dobil iz result shemo?
Ker delat ročno json kot v kodi je nonsense poleg tega buggy :)
hvala
Kako bi dobil iz result shemo?
Ker delat ročno json kot v kodi je nonsense poleg tega buggy :)
hvala
Skero
![](https://static.slo-tech.com/stili/avatar_gray.gif)
detroit ::
ok rešitev je sledeča
naredil sm array columnov
in potem funkcijo ki je sprejela row iz result in vračala
return dict((col, str(getattr(row, col)).decode('windows-1250').encode('utf-8')) for col in columns)
that's it, če komu koristi
naredil sm array columnov
in potem funkcijo ki je sprejela row iz result in vračala
return dict((col, str(getattr(row, col)).decode('windows-1250').encode('utf-8')) for col in columns)
that's it, če komu koristi
Skero
Vredno ogleda ...
Tema | Ogledi | Zadnje sporočilo | |
---|---|---|---|
Tema | Ogledi | Zadnje sporočilo | |
» | Python - pomoč (strani: 1 2 3 )Oddelek: Programiranje | 18270 (9018) | black ice |
» | JqueryOddelek: Izdelava spletišč | 1831 (1555) | mk818764 |
» | [Java] Urejanje baze z JTableOddelek: Programiranje | 1031 (815) | vonNeumann |
» | button v image buttonOddelek: Izdelava spletišč | 1252 (1157) | R33D3M33R |
» | [PHP]rezultat SQL querija -> dvodimenzionalen ARRAY ??Oddelek: Izdelava spletišč | 1236 (1194) | Ziga Dolhar |