mirror of https://github.com/interlegis/sapl.git
Luciano Almeida
9 years ago
7 changed files with 181 additions and 16 deletions
@ -1,3 +1,19 @@ |
|||
from sapl.utils import register_all_models_in_admin |
|||
from django.contrib import admin |
|||
from base.models import ProblemaMigracao |
|||
|
|||
register_all_models_in_admin(__name__) |
|||
|
|||
admin.site.unregister(ProblemaMigracao) |
|||
|
|||
|
|||
@admin.register(ProblemaMigracao) |
|||
class ProblemaMigracaoAdmin(admin.ModelAdmin): |
|||
list_display = ["content_type", "object_id", "problema", |
|||
"descricao", "get_url"] |
|||
|
|||
def get_url(self, obj): |
|||
return "<a href='%s'>%s</a>" % (obj.endereco, obj.endereco) |
|||
|
|||
get_url.short_description = "Endereco" |
|||
get_url.allow_tags = True |
|||
|
@ -0,0 +1,32 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.9 on 2016-04-19 16:02 |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import migrations, models |
|||
import django.db.models.deletion |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('contenttypes', '0002_remove_content_type_name'), |
|||
('base', '0010_auto_20160309_1323'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.CreateModel( |
|||
name='ProblemaMigracao', |
|||
fields=[ |
|||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
|||
('object_id', models.PositiveIntegerField(verbose_name='ID do Objeto')), |
|||
('problema', models.CharField(max_length=300, null=True, verbose_name='Problema')), |
|||
('descricao', models.CharField(max_length=300, null=True, verbose_name='Descrição')), |
|||
('endereco', models.URLField(null=True, verbose_name='Endereço')), |
|||
('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType', verbose_name='Tipo de Content')), |
|||
], |
|||
options={ |
|||
'verbose_name_plural': 'Problemas na Migração', |
|||
'verbose_name': 'Problema na Migração', |
|||
}, |
|||
), |
|||
] |
@ -0,0 +1,26 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.9 on 2016-04-19 13:56 |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import migrations, models |
|||
import django.db.models.deletion |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('materia', '0027_auto_20160404_1409'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AlterField( |
|||
model_name='tramitacao', |
|||
name='unidade_tramitacao_destino', |
|||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tramitacoes_destino', to='materia.UnidadeTramitacao', verbose_name='Unidade Destino'), |
|||
), |
|||
migrations.AlterField( |
|||
model_name='tramitacao', |
|||
name='unidade_tramitacao_local', |
|||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tramitacoes_origem', to='materia.UnidadeTramitacao', verbose_name='Unidade Local'), |
|||
), |
|||
] |
Loading…
Reference in new issue