@ -1,17 +1,18 @@
import reversion
from django . contrib . contenttypes . fields import GenericForeignKey
from django . contrib . contenttypes . fields import GenericForeignKey
from django . contrib . contenttypes . models import ContentType
from django . contrib . contenttypes . models import ContentType
from django . db import models
from django . db import models
from django . db . models . signals import post_migrate
from django . db . models . signals import post_migrate
from django . db . utils import DEFAULT_DB_ALIAS
from django . db . utils import DEFAULT_DB_ALIAS
from django . utils . translation import ugettext_lazy as _
from django . utils . translation import ugettext_lazy as _
import reversion
from sapl . utils import (
from sapl . utils import (
UF ,
UF ,
YES_NO_CHOICES ,
YES_NO_CHOICES ,
get_settings_auth_user_model ,
get_settings_auth_user_model ,
models_with_gr_for_model
models_with_gr_for_model
)
)
TIPO_DOCUMENTO_ADMINISTRATIVO = ( ( ' O ' , _ ( ' Ostensivo ' ) ) ,
TIPO_DOCUMENTO_ADMINISTRATIVO = ( ( ' O ' , _ ( ' Ostensivo ' ) ) ,
( ' R ' , _ ( ' Restritivo ' ) ) )
( ' R ' , _ ( ' Restritivo ' ) ) )
@ -176,6 +177,7 @@ class AppConfig(models.Model):
( ' menu_sistemas ' , _ ( ' Renderizar Menu Sistemas ' ) ) ,
( ' menu_sistemas ' , _ ( ' Renderizar Menu Sistemas ' ) ) ,
( ' view_tabelas_auxiliares ' , _ ( ' Visualizar Tabelas Auxiliares ' ) ) ,
( ' view_tabelas_auxiliares ' , _ ( ' Visualizar Tabelas Auxiliares ' ) ) ,
)
)
ordering = ( ' -id ' , )
@classmethod
@classmethod
def attr ( cls , attr ) :
def attr ( cls , attr ) :
@ -289,4 +291,5 @@ def cria_models_tipo_autor(app_config, verbosity=2, interactive=True,
# Disconecta função para evitar a chamada repetidas vezes.
# Disconecta função para evitar a chamada repetidas vezes.
post_migrate . disconnect ( receiver = cria_models_tipo_autor )
post_migrate . disconnect ( receiver = cria_models_tipo_autor )
post_migrate . connect ( receiver = cria_models_tipo_autor )
post_migrate . connect ( receiver = cria_models_tipo_autor )