Browse Source

Move crud para crud.base

pull/255/head
Marcio Mazza 9 years ago
parent
commit
1b5a9fa193
  1. 2
      comissoes/views.py
  2. 2
      compilacao/views.py
  3. 0
      crud/__init__.py
  4. 0
      crud/base.py
  5. 0
      crud/tests/__init__.py
  6. 0
      crud/tests/layouts.yaml
  7. 0
      crud/tests/models.py
  8. 12
      crud/tests/settings.py
  9. 0
      crud/tests/templates/base.html
  10. 4
      crud/tests/test_base.py
  11. 0
      crud/tests/urls.py
  12. 2
      crud/tests/views.py
  13. 2
      lexml/views.py
  14. 2
      materia/views.py
  15. 2
      norma/views.py
  16. 2
      painel/views.py
  17. 2
      parlamentares/views.py
  18. 2
      protocoloadm/views.py
  19. 2
      pytest.ini
  20. 2
      sessao/views.py
  21. 2
      test_and_check_qa.sh

2
comissoes/views.py

@ -5,7 +5,7 @@ from django.views.generic import CreateView, ListView
from django.views.generic.edit import FormMixin
from vanilla import GenericView
from crud import Crud
from crud.base import Crud
from materia.models import Tramitacao
from parlamentares.models import Filiacao

2
compilacao/views.py

@ -27,7 +27,7 @@ from compilacao.models import (Dispositivo, Nota,
TextoArticulado, TipoDispositivo, TipoNota,
TipoPublicacao, TipoTextoArticulado, TipoVide,
VeiculoPublicacao, Vide)
from crud import Crud, CrudListMixin, make_pagination
from crud.base import Crud, CrudListMixin, make_pagination
DISPOSITIVO_SELECT_RELATED = (
'tipo_dispositivo',

0
crud_tests/__init__.py → crud/__init__.py

0
crud.py → crud/base.py

0
crud/tests/__init__.py

0
crud_tests/layouts.yaml → crud/tests/layouts.yaml

0
crud_tests/models.py → crud/tests/models.py

12
crud_tests/settings.py → crud/tests/settings.py

@ -1,6 +1,6 @@
import os
from os.path import dirname, join
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
BASE_DIR = dirname(dirname(dirname(__file__)))
DATABASES = {
'default': {
@ -15,11 +15,11 @@ INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.messages',
'django.contrib.sessions',
'crud_tests',
'crud.tests',
'crispy_forms',
)
ROOT_URLCONF = 'crud_tests.urls'
ROOT_URLCONF = 'crud.tests.urls'
USE_TZ = True
@ -27,8 +27,8 @@ SECRET_KEY = 'zzz...'
TEMPLATES = [{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'crud_tests/templates'),
os.path.join(BASE_DIR, 'templates')],
'DIRS': [join(BASE_DIR, 'crud/tests/templates'),
join(BASE_DIR, 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [

0
crud_tests/templates/base.html → crud/tests/templates/base.html

4
crud_tests/test_flux.py → crud/tests/test_base.py

@ -2,8 +2,8 @@ import pytest
from django.core.urlresolvers import reverse
from model_mommy import mommy
from crud import (CrispyLayoutFormMixin, CrudListMixin, from_to,
get_field_display, make_pagination)
from crud.base import (CrispyLayoutFormMixin, CrudListMixin, from_to,
get_field_display, make_pagination)
from .models import Continent, Country
from .views import CountryCrudListMixin

0
crud_tests/urls.py → crud/tests/urls.py

2
crud_tests/views.py → crud/tests/views.py

@ -1,4 +1,4 @@
from crud import Crud, CrudListMixin
from crud.base import Crud, CrudListMixin
from .models import Country

2
lexml/views.py

@ -1,4 +1,4 @@
from crud import Crud
from crud.base import Crud
from .models import LexmlProvedor, LexmlPublicador

2
materia/views.py

@ -17,7 +17,7 @@ from django.views.generic import CreateView, FormView, ListView, TemplateView
from base.models import CasaLegislativa
from comissoes.models import Comissao, Composicao
from compilacao.views import IntegracaoTaView
from crud import Crud, make_pagination
from crud.base import Crud, make_pagination
from norma.models import LegislacaoCitada, NormaJuridica, TipoNormaJuridica
from parlamentares.models import Partido
from sapl.utils import get_base_url

2
norma/views.py

@ -9,7 +9,7 @@ from django.views.generic import CreateView, ListView
from vanilla.views import GenericView
from compilacao.views import IntegracaoTaView
from crud import Crud, make_pagination
from crud.base import Crud, make_pagination
from materia.models import MateriaLegislativa
from .forms import NormaJuridicaForm, NormaJuridicaPesquisaForm

2
painel/views.py

@ -5,7 +5,7 @@ from django.http import HttpResponse, JsonResponse
from django.shortcuts import render
from django.utils.translation import ugettext_lazy as _
from crud import Crud
from crud.base import Crud
from painel.models import Painel
from parlamentares.models import Filiacao
from sessao.models import (ExpedienteMateria, OrdemDia, PresencaOrdemDia,

2
parlamentares/views.py

@ -8,7 +8,7 @@ from django.utils.translation import ugettext_lazy as _
from django.views.generic.edit import FormMixin
from vanilla import GenericView
from crud import Crud
from crud.base import Crud
from .forms import (DependenteEditForm, DependenteForm, FiliacaoEditForm,
FiliacaoForm, MandatoEditForm, MandatoForm,

2
protocoloadm/views.py

@ -13,7 +13,7 @@ from django.views.generic.base import TemplateView
from django.views.generic.edit import FormMixin
from vanilla import GenericView
from crud import Crud, make_pagination
from crud.base import Crud, make_pagination
from materia.models import Proposicao, TipoMateriaLegislativa
from sapl.utils import create_barcode, get_client_ip

2
pytest.ini

@ -1,6 +1,6 @@
[pytest]
DJANGO_SETTINGS_MODULE=sapl.settings
norecursedirs = legacy crud_tests
norecursedirs = legacy crud
# REUSING DATABASE BY DEFAULT (as a performance optimization)
# http://pytest-django.readthedocs.org/en/latest/database.html#example-work-flow-with-reuse-db-and-create-db

2
sessao/views.py

@ -11,7 +11,7 @@ from django.views.generic import CreateView, ListView
from django.views.generic.edit import FormMixin
from rest_framework import generics
from crud import Crud, make_pagination
from crud.base import Crud, make_pagination
from materia.models import (Autoria, DocumentoAcessorio,
TipoMateriaLegislativa, Tramitacao)
from norma.models import NormaJuridica

2
test_and_check_qa.sh

@ -3,5 +3,5 @@
# QA checks: run this before every commit
py.test
py.test --ds=crud_tests.settings crud_tests
py.test --ds=crud.tests.settings crud/tests
./check_qa.sh

Loading…
Cancel
Save