mirror of https://github.com/interlegis/sigi.git
Sesostris Vieira
4 years ago
23 changed files with 828 additions and 5863 deletions
File diff suppressed because it is too large
@ -1,16 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from dados_gerentes import atrib, gerentes |
|||
from sigi.apps.casas.models import CasaLegislativa |
|||
|
|||
|
|||
def salvar(): |
|||
for cod, abrev_gerente in atrib: |
|||
casas = CasaLegislativa.objects.filter(municipio__codigo_ibge=cod, tipo__sigla='CM') |
|||
if not casas: |
|||
print '############################# SEM CASA: ', cod |
|||
elif len(casas) > 1: |
|||
print '############################# VÁRIAS CASAS: ', cod, casas |
|||
else: |
|||
[c] = casas |
|||
c.gerente_contas = gerentes[abrev_gerente] |
|||
c.save() |
@ -0,0 +1,20 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import models, migrations |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('casas', '0003_auto_20200207_0919'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AlterField( |
|||
model_name='casalegislativa', |
|||
name='gerente_contas', |
|||
field=models.ForeignKey(related_name='casas_que_gerencia_old', verbose_name=b'Gerente de contas', blank=True, to='servidores.Servidor', null=True), |
|||
preserve_default=True, |
|||
), |
|||
] |
@ -0,0 +1,21 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import models, migrations |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('servidores', '0001_initial'), |
|||
('casas', '0004_auto_20201015_0810'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AddField( |
|||
model_name='casalegislativa', |
|||
name='gerentes_interlegis', |
|||
field=models.ManyToManyField(related_name='casas_que_gerencia', verbose_name=b'Gerentes Interlegis', to='servidores.Servidor'), |
|||
preserve_default=True, |
|||
), |
|||
] |
@ -0,0 +1,18 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import models, migrations |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('casas', '0005_casalegislativa_gerentes_interlegis'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.RemoveField( |
|||
model_name='casalegislativa', |
|||
name='gerente_contas', |
|||
), |
|||
] |
@ -0,0 +1,128 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import models, migrations |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('casas', '0006_remove_casalegislativa_gerente_contas'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AddField( |
|||
model_name='funcionario', |
|||
name='desativado', |
|||
field=models.BooleanField(default=False, verbose_name='Desativado'), |
|||
preserve_default=True, |
|||
), |
|||
migrations.AddField( |
|||
model_name='funcionario', |
|||
name='observacoes', |
|||
field=models.TextField(verbose_name='Observa\xe7\xf5es', blank=True), |
|||
preserve_default=True, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='casalegislativa', |
|||
name='bairro', |
|||
field=models.CharField(max_length=100, verbose_name='Bairro', blank=True), |
|||
preserve_default=True, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='casalegislativa', |
|||
name='cep', |
|||
field=models.CharField(max_length=32, verbose_name='CEP'), |
|||
preserve_default=True, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='casalegislativa', |
|||
name='codigo_interlegis', |
|||
field=models.CharField(max_length=3, verbose_name='C\xf3digo Interlegis', blank=True), |
|||
preserve_default=True, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='casalegislativa', |
|||
name='email', |
|||
field=models.EmailField(max_length=128, verbose_name='E-mail', blank=True), |
|||
preserve_default=True, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='casalegislativa', |
|||
name='foto', |
|||
field=models.ImageField(upload_to=b'imagens/casas', width_field=b'foto_largura', height_field=b'foto_altura', blank=True, verbose_name='Foto'), |
|||
preserve_default=True, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='casalegislativa', |
|||
name='inclusao_digital', |
|||
field=models.CharField(default=b'NAO PESQUISADO', max_length=30, verbose_name='Inclus\xe3o digital', choices=[(b'NAO PESQUISADO', 'N\xe3o pesquisado'), (b'NAO POSSUI PORTAL', 'N\xe3o possui portal'), (b'PORTAL MODELO', 'Possui Portal Modelo'), (b'OUTRO PORTAL', 'Possui outro portal')]), |
|||
preserve_default=True, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='casalegislativa', |
|||
name='logradouro', |
|||
field=models.CharField(help_text='Avenida, rua, pra\xe7a, jardim, parque...', max_length=100, verbose_name='Logradouro'), |
|||
preserve_default=True, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='casalegislativa', |
|||
name='municipio', |
|||
field=models.ForeignKey(verbose_name='Munic\xedpio', to='contatos.Municipio'), |
|||
preserve_default=True, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='casalegislativa', |
|||
name='nome', |
|||
field=models.CharField(help_text='Exemplo: <em>C\xe2mara Municipal de Pains</em>.', max_length=60, verbose_name='Nome'), |
|||
preserve_default=True, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='casalegislativa', |
|||
name='pagina_web', |
|||
field=models.URLField(help_text='Exemplo: <em>http://www.camarapains.mg.gov.br</em>.', verbose_name='P\xe1gina web', blank=True), |
|||
preserve_default=True, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='funcionario', |
|||
name='cargo', |
|||
field=models.CharField(max_length=100, null=True, verbose_name='Cargo', blank=True), |
|||
preserve_default=True, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='funcionario', |
|||
name='nota', |
|||
field=models.CharField(max_length=70, null=True, verbose_name='Telefones', blank=True), |
|||
preserve_default=True, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='funcionario', |
|||
name='setor', |
|||
field=models.CharField(default=b'outros', max_length=100, verbose_name='Setor', choices=[(b'presidente', 'Presidente'), (b'contato_interlegis', 'Contato Interlegis'), (b'infraestrutura_fisica', 'Infraestrutura F\xedsica'), (b'estrutura_de_ti', 'Estrutura de TI'), (b'organizacao_do_processo_legislativo', 'Organiza\xe7\xe3o do Processo Legislativo'), (b'producao_legislativa', 'Produ\xe7\xe3o Legislativa'), (b'estrutura_de_comunicacao_social', 'Estrutura de Comunica\xe7\xe3o Social'), (b'estrutura_de_recursos_humanos', 'Estrutura de Recursos Humanos'), (b'gestao', 'Gest\xe3o'), (b'outros', 'Outros')]), |
|||
preserve_default=True, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='funcionario', |
|||
name='sexo', |
|||
field=models.CharField(default=b'M', max_length=1, verbose_name='Sexo', choices=[(b'M', 'Masculino'), (b'F', 'Feminino')]), |
|||
preserve_default=True, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='funcionario', |
|||
name='tempo_de_servico', |
|||
field=models.CharField(max_length=50, null=True, verbose_name='Tempo de servi\xe7o', blank=True), |
|||
preserve_default=True, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='tipocasalegislativa', |
|||
name='nome', |
|||
field=models.CharField(max_length=100, verbose_name='Nome'), |
|||
preserve_default=True, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='tipocasalegislativa', |
|||
name='sigla', |
|||
field=models.CharField(max_length=5, verbose_name='Sigla'), |
|||
preserve_default=True, |
|||
), |
|||
] |
@ -0,0 +1,20 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import models, migrations |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('convenios', '0001_initial'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AddField( |
|||
model_name='convenio', |
|||
name='duracao', |
|||
field=models.PositiveIntegerField(help_text='Deixar em branco caso a dura\xe7\xe3o seja indefinida', null=True, verbose_name='Dura\xe7\xe3o (meses)', blank=True), |
|||
preserve_default=True, |
|||
), |
|||
] |
Loading…
Reference in new issue