Browse Source

fix: ajusta nome alternativo e add migrates

pull/3615/head
LeandroJatai 2 years ago
parent
commit
0a3e08f377
  1. 18
      sapl/base/migrations/0053_auto_20220919_1705.py
  2. 2
      sapl/base/models.py
  3. 2
      sapl/context_processors.py
  4. 35
      sapl/norma/migrations/0043_viewnormasestatisticas.py
  5. 17
      sapl/protocoloadm/migrations/0043_auto_20220919_1705.py
  6. 19
      sapl/sessao/migrations/0069_auto_20220919_1705.py
  7. 2
      sapl/templates/base.html

18
sapl/base/migrations/0053_auto_20220919_1705.py

@ -0,0 +1,18 @@
# Generated by Django 2.2.28 on 2022-09-19 20:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('base', '0052_auto_20220914_1125'),
]
operations = [
migrations.AlterField(
model_name='appconfig',
name='sapl_as_sapn',
field=models.BooleanField(choices=[(True, 'Sim'), (False, 'Não')], default=False, verbose_name='Utilizar SAPL apenas como SAPL-Normas?'),
),
]

2
sapl/base/models.py

@ -104,7 +104,7 @@ class AppConfig(models.Model):
choices=ESFERA_FEDERACAO_CHOICES) choices=ESFERA_FEDERACAO_CHOICES)
sapl_as_sapn = models.BooleanField( sapl_as_sapn = models.BooleanField(
verbose_name=_( verbose_name=_(
'Utilizar SAPL como SAPN?'), 'Utilizar SAPL apenas como SAPL-Normas?'),
choices=YES_NO_CHOICES, default=False) choices=YES_NO_CHOICES, default=False)
# MÓDULO PARLAMENTARES # MÓDULO PARLAMENTARES

2
sapl/context_processors.py

@ -41,5 +41,5 @@ def sapl_as_sapn(request):
'sapl_as_sapn': sapl_as_sapn_utils(), 'sapl_as_sapn': sapl_as_sapn_utils(),
'nome_sistema': _('Sistema de Apoio ao Processo Legislativo') 'nome_sistema': _('Sistema de Apoio ao Processo Legislativo')
if not sapl_as_sapn_utils() if not sapl_as_sapn_utils()
else _('Sistema de Apoio a Publicação de Normas') else _('Sistema de Apoio à Publicação de Leis e Normas')
} }

35
sapl/norma/migrations/0043_viewnormasestatisticas.py

@ -0,0 +1,35 @@
# Generated by Django 2.2.28 on 2022-09-19 20:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('norma', '0042_norma_viewnormasestatisticas'),
]
operations = [
migrations.CreateModel(
name='ViewNormasEstatisticas',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('mais_acessadas', models.PositiveSmallIntegerField(verbose_name='Mais Acessadas')),
('ano_est', models.PositiveSmallIntegerField(verbose_name='Ano do Registro de Acesso')),
('mes_est', models.PositiveSmallIntegerField(verbose_name='Mês do Registro de Acesso')),
('norma_id', models.BigIntegerField(verbose_name='Id da Norma')),
('norma_count', models.PositiveSmallIntegerField(verbose_name='Mês do Registro de Acesso')),
('norma_numero', models.CharField(max_length=8, verbose_name='Número da Norma')),
('norma_ano', models.PositiveSmallIntegerField(verbose_name='Ano da Norma')),
('norma_ementa', models.TextField(verbose_name='Ementa')),
('norma_observacao', models.TextField(blank=True, verbose_name='Observação')),
('norma_tipo_sigla', models.CharField(max_length=3, verbose_name='Sigla do Tipo da Norma')),
('norma_tipo_descricao', models.CharField(max_length=50, verbose_name='Descrição do Tipo da Norma')),
('norma_data', models.DateField(verbose_name='Data da Norma')),
],
options={
'db_table': 'norma_viewnormasestatisticas',
'managed': False,
},
),
]

17
sapl/protocoloadm/migrations/0043_auto_20220919_1705.py

@ -0,0 +1,17 @@
# Generated by Django 2.2.28 on 2022-09-19 20:05
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('protocoloadm', '0042_auto_20220805_1236'),
]
operations = [
migrations.AlterModelOptions(
name='documentoadministrativo',
options={'ordering': ('ano', 'numero', 'id'), 'verbose_name': 'Documento Administrativo', 'verbose_name_plural': 'Documentos Administrativos'},
),
]

19
sapl/sessao/migrations/0069_auto_20220919_1705.py

@ -0,0 +1,19 @@
# Generated by Django 2.2.28 on 2022-09-19 20:05
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('sessao', '0068_auto_20220816_1237'),
]
operations = [
migrations.AlterField(
model_name='correspondencia',
name='sessao_plenaria',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='correspondencia_set', to='sessao.SessaoPlenaria', verbose_name='Sessão Plenária'),
),
]

2
sapl/templates/base.html

@ -11,7 +11,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>{% block head_title %}{% trans 'SAPL - Sistema de Apoio ao Processo Legislativo' %}{% endblock %}</title> <title>{% block head_title %}{% if sapl_as_sapn %}SAPL-Normas - {% else %}SAPL - {%endif%}{{nome_sistema}}{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#343a40"> <meta name="theme-color" content="#343a40">

Loading…
Cancel
Save