Browse Source

fix qa_check and insert timestampdmixin

pull/10/head
LeandroRoberto 9 years ago
parent
commit
4bf19b3077
  1. 2
      base/migrations/0001_initial.py
  2. 2
      comissoes/migrations/0001_initial.py
  3. 2
      comissoes/migrations/0002_auto_20150729_1310.py
  4. 8
      compilacao/forms.py
  5. 2
      compilacao/migrations/0001_initial.py
  6. 2
      compilacao/migrations/0002_auto_20150907_2334.py
  7. 2
      compilacao/migrations/0003_auto_20150911_1735.py
  8. 2
      compilacao/migrations/0004_auto_20150914_0842.py
  9. 2
      compilacao/migrations/0005_auto_20150924_1012.py
  10. 2
      compilacao/migrations/0006_auto_20150924_1121.py
  11. 2
      compilacao/migrations/0007_auto_20150924_1131.py
  12. 2
      compilacao/migrations/0008_auto_20151005_1023.py
  13. 2
      compilacao/migrations/0009_auto_20151007_1635.py
  14. 3
      compilacao/migrations/0016_auto_20151119_0950.py
  15. 13
      compilacao/models.py
  16. 10
      compilacao/views.py
  17. 2
      lexml/migrations/0001_initial.py
  18. 2
      lexml/migrations/0002_auto_20150806_1614.py
  19. 2
      materia/migrations/0001_initial.py
  20. 2
      materia/migrations/0002_auto_20150729_1310.py
  21. 2
      materia/migrations/0003_auto_20150729_1717.py
  22. 3
      materia/migrations/0004_materialegislativa_texto_original.py
  23. 2
      materia/migrations/0005_auto_20150923_0941.py
  24. 2
      materia/migrations/0006_proposicao_status.py
  25. 2
      materia/migrations/0007_auto_20151021_1200.py
  26. 2
      materia/migrations/0008_auto_20151029_1416.py
  27. 2
      materia/migrations/0009_auto_20151029_1420.py
  28. 3
      materia/migrations/0010_auto_20151117_1551.py
  29. 2
      norma/migrations/0001_initial.py
  30. 2
      norma/migrations/0002_auto_20150729_1717.py
  31. 2
      norma/migrations/0003_auto_20150906_0239.py
  32. 2
      norma/migrations/0004_auto_20150907_0004.py
  33. 2
      norma/migrations/0005_auto_20150915_1141.py
  34. 4
      norma/urls.py
  35. 2
      painel/migrations/0001_initial.py
  36. 2
      parlamentares/migrations/0001_initial.py
  37. 2
      parlamentares/migrations/0002_auto_20150729_1310.py
  38. 2
      parlamentares/migrations/0003_auto_20150729_1717.py
  39. 2
      parlamentares/migrations/0004_auto_20150929_1425.py
  40. 3
      parlamentares/migrations/0005_parlamentar_fotografia.py
  41. 2
      parlamentares/migrations/0006_auto_20151119_1318.py
  42. 2
      protocoloadm/migrations/0001_initial.py
  43. 2
      protocoloadm/migrations/0002_auto_20150729_1717.py
  44. 3
      protocoloadm/migrations/0003_documentoacessorioadministrativo_texto_integral.py
  45. 3
      protocoloadm/migrations/0004_auto_20151007_1035.py
  46. 3
      protocoloadm/migrations/0005_auto_20151008_0744.py
  47. 3
      sapl/settings.py
  48. 2
      sessao/migrations/0001_initial.py
  49. 2
      sessao/migrations/0002_auto_20150729_1450.py
  50. 2
      sessao/migrations/0003_remove_sessaoplenaria_tipo_expediente.py
  51. 3
      sessao/migrations/0004_auto_20150806_1614.py
  52. 2
      sessao/migrations/0005_remove_presencaordemdia_data_ordem.py
  53. 2
      sessao/migrations/0006_auto_20150929_1425.py
  54. 2
      sessao/migrations/0007_auto_20150929_1426.py
  55. 2
      sessao/migrations/0008_auto_20151005_0814.py
  56. 2
      sessao/migrations/0009_auto_20151005_0934.py

2
base/migrations/0001_initial.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
comissoes/migrations/0001_initial.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
comissoes/migrations/0002_auto_20150729_1310.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

8
compilacao/forms.py

@ -0,0 +1,8 @@
from django import forms
from django.utils.translation import ugettext_lazy as _
class UpLoadImportFileForm(forms.Form):
import_file = forms.FileField(
required=True,
label=_('Arquivo formato ODF para Importanção'))

2
compilacao/migrations/0001_initial.py

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):

2
compilacao/migrations/0002_auto_20150907_2334.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
compilacao/migrations/0003_auto_20150911_1735.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
compilacao/migrations/0004_auto_20150914_0842.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
compilacao/migrations/0005_auto_20150924_1012.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
compilacao/migrations/0006_auto_20150924_1121.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
compilacao/migrations/0007_auto_20150924_1131.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
compilacao/migrations/0008_auto_20151005_1023.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
compilacao/migrations/0009_auto_20151007_1635.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

3
compilacao/migrations/0016_auto_20151119_0950.py

@ -1,8 +1,9 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import datetime
from django.db import migrations, models
from django.utils.timezone import utc

13
compilacao/models.py

@ -368,7 +368,7 @@ class VeiculoPublicacao(models.Model):
return '%s: %s' % (self.sigla, self.nome)
class Publicacao(models.Model):
class Publicacao(TimestampedMixin):
norma = models.ForeignKey(
NormaJuridica, verbose_name=_('Norma Jurídica'))
veiculo_publicacao = models.ForeignKey(
@ -380,7 +380,6 @@ class Publicacao(models.Model):
blank=True, null=True, verbose_name=_('Pg. Início'))
pagina_fim = models.PositiveIntegerField(
blank=True, null=True, verbose_name=_('Pg. Fim'))
timestamp = models.DateTimeField()
class Meta:
verbose_name = _('Publicação')
@ -852,7 +851,7 @@ class Dispositivo(BaseModel, TimestampedMixin):
tipo_dispositivo_id=self.tipo_dispositivo.pk))
else: # contagem continua restrita a articulacao
proxima_articulacao = self.get_proxima_articulacao()
proxima_articulacao = self.get_proximo_nivel_zero()
if proxima_articulacao is None:
irmaos = list(Dispositivo.objects.filter(
@ -940,7 +939,7 @@ class Dispositivo(BaseModel, TimestampedMixin):
irmao.clean()
irmao.save()
def get_proxima_articulacao(self):
def get_proximo_nivel_zero(self):
proxima_articulacao = Dispositivo.objects.filter(
ordem__gt=self.ordem,
nivel=0,
@ -1025,8 +1024,7 @@ class Dispositivo(BaseModel, TimestampedMixin):
dispositivo.set_numero_completo([1, 0, 0, 0, 0, 0, ])
class Vide(models.Model):
data_criacao = models.DateTimeField(verbose_name=_('Data de Criação'))
class Vide(TimestampedMixin):
texto = models.TextField(verbose_name=_('Texto do Vide'))
tipo = models.ForeignKey(TipoVide, verbose_name=_('Tipo do Vide'))
@ -1048,7 +1046,7 @@ class Vide(models.Model):
return _('Vide %s') % self.texto
class Nota(models.Model):
class Nota(TimestampedMixin):
NPRIV = 1
NSTRL = 2
NINST = 3
@ -1070,7 +1068,6 @@ class Nota(models.Model):
blank=True,
verbose_name=_('Url externa'))
data_criacao = models.DateTimeField(verbose_name=_('Data de Criação'))
publicacao = models.DateTimeField(verbose_name=_('Data de Publicação'))
efetifidade = models.DateTimeField(verbose_name=_('Data de Efeito'))

10
compilacao/views.py

@ -2,7 +2,6 @@ from collections import OrderedDict
from datetime import datetime, timedelta
from os.path import sys
from django import forms
from django.core.signing import Signer
from django.db.models import Q
from django.http.response import JsonResponse
@ -14,6 +13,7 @@ from django.views.generic.edit import FormMixin
from django.views.generic.list import ListView
from compilacao.file2dispositivo import Parser
from compilacao.forms import UpLoadImportFileForm
from compilacao.models import (Dispositivo, PerfilEstruturalTextosNormativos,
TipoDispositivo, TipoNota, TipoPublicacao,
TipoVide, VeiculoPublicacao)
@ -253,12 +253,6 @@ class DispositivoView(CompilacaoView):
return itens
class UpLoadImportFileForm(forms.Form):
import_file = forms.FileField(
required=True,
label=_('Arquivo formato ODF para Importanção'))
def handle_uploaded_file(f, outfilepath):
with open(outfilepath, 'wb+') as destination:
for chunk in f.chunks():
@ -1018,7 +1012,7 @@ class ActionsEditMixin(object):
pkfilho = dispositivo.pk
dispositivo = dispositivo.dispositivo_pai
proxima_articulacao = dispositivo.get_proxima_articulacao()
proxima_articulacao = dispositivo.get_proximo_nivel_zero()
if proxima_articulacao is not None:
parents = Dispositivo.objects.filter(

2
lexml/migrations/0001_initial.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
lexml/migrations/0002_auto_20150806_1614.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
materia/migrations/0001_initial.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
materia/migrations/0002_auto_20150729_1310.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
materia/migrations/0003_auto_20150729_1717.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

3
materia/migrations/0004_materialegislativa_texto_original.py

@ -1,7 +1,8 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
import materia.models

2
materia/migrations/0005_auto_20150923_0941.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
materia/migrations/0006_proposicao_status.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
materia/migrations/0007_auto_20151021_1200.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
materia/migrations/0008_auto_20151029_1416.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
materia/migrations/0009_auto_20151029_1420.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

3
materia/migrations/0010_auto_20151117_1551.py

@ -1,7 +1,8 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
import materia.models

2
norma/migrations/0001_initial.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
norma/migrations/0002_auto_20150729_1717.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
norma/migrations/0003_auto_20150906_0239.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
norma/migrations/0004_auto_20150907_0004.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
norma/migrations/0005_auto_20150915_1141.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

4
norma/urls.py

@ -1,6 +1,6 @@
from django.conf.urls import url, include
from django.conf.urls import include, url
from norma.views import NormaIncluirView, tipo_norma_crud, assunto_norma_crud
from norma.views import NormaIncluirView, assunto_norma_crud, tipo_norma_crud
urlpatterns = [
# url(r'^norma/', include(norma_url_patterns,

2
painel/migrations/0001_initial.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
parlamentares/migrations/0001_initial.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
parlamentares/migrations/0002_auto_20150729_1310.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
parlamentares/migrations/0003_auto_20150729_1717.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
parlamentares/migrations/0004_auto_20150929_1425.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

3
parlamentares/migrations/0005_parlamentar_fotografia.py

@ -1,7 +1,8 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
import parlamentares.models

2
parlamentares/migrations/0006_auto_20151119_1318.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
protocoloadm/migrations/0001_initial.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
protocoloadm/migrations/0002_auto_20150729_1717.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

3
protocoloadm/migrations/0003_documentoacessorioadministrativo_texto_integral.py

@ -1,7 +1,8 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
import protocoloadm.models

3
protocoloadm/migrations/0004_auto_20151007_1035.py

@ -1,7 +1,8 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
import protocoloadm.models

3
protocoloadm/migrations/0005_auto_20151008_0744.py

@ -1,7 +1,8 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
import protocoloadm.models

3
sapl/settings.py

@ -60,8 +60,7 @@ INSTALLED_APPS = (
'sass_processor',
)
if DEBUG:
# INSTALLED_APPS += ('debug_toolbar',)
pass
INSTALLED_APPS += ('debug_toolbar',)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',

2
sessao/migrations/0001_initial.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
sessao/migrations/0002_auto_20150729_1450.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
sessao/migrations/0003_remove_sessaoplenaria_tipo_expediente.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

3
sessao/migrations/0004_auto_20150806_1614.py

@ -1,7 +1,8 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
import sessao.models

2
sessao/migrations/0005_remove_presencaordemdia_data_ordem.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
sessao/migrations/0006_auto_20150929_1425.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
sessao/migrations/0007_auto_20150929_1426.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
sessao/migrations/0008_auto_20151005_0814.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

2
sessao/migrations/0009_auto_20151005_0934.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

Loading…
Cancel
Save