def rosreestr fields result for row in conn execute self query rec dic

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
def rosreestr(fields):
result = ''
for row in conn.execute(self.query):
rec = dict(zip(row.keys(), row))
for i in range(len(fields)):
result += fields[i]+';'
result.append(rec)
response = Response()
response.content_type = 'text/plain'
response.content_disposition = 'attachment; filename={}'.format('rosreestr.txt')
response.text = result
return result