Browse Source

Add ad-hoc script to list portal modelo's urls

producao
Marcio Mazza 10 years ago
parent
commit
6529d39eca
  1. 8
      scripts/urls de portais modelo por estado municipio.py

8
scripts/urls de portais modelo por estado municipio.py

@ -0,0 +1,8 @@
from sigi.apps.servicos.models import TipoServico
pm = TipoServico.objects.first()
res = sorted([(p.casa_legislativa.municipio.uf, p.casa_legislativa.municipio.nome, p.url) for p in pm.servico_set.all()])
with open('/tmp/pm.csv', 'w+') as f:
for uf, cid, url in res:
f.write(('%s,%s,%s' % (uf.nome, cid, url) + '\n').encode('utf-8'))
Loading…
Cancel
Save