From c297c5a1b4ed42bd1ba5af95acdf0c93c85208e1 Mon Sep 17 00:00:00 2001 From: Eduardo Edson Batista Cordeiro Alves Date: Thu, 28 Apr 2016 08:56:04 -0300 Subject: [PATCH] =?UTF-8?q?Detail=20de=20Mat=C3=A9ria=20Anexada?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- materia/layouts.yaml | 6 ++++++ materia/views.py | 15 +++------------ templates/materia/anexada_detail.html | 3 --- 3 files changed, 9 insertions(+), 15 deletions(-) delete mode 100644 templates/materia/anexada_detail.html diff --git a/materia/layouts.yaml b/materia/layouts.yaml index 90bd68990..260f44d4f 100644 --- a/materia/layouts.yaml +++ b/materia/layouts.yaml @@ -41,6 +41,12 @@ Anexada: - tipo numero ano - data_anexacao data_desanexacao +AnexadaDetail: + Matéria Anexada: + - materia_principal + - materia_anexada + - data_anexacao data_desanexacao + TipoAutor: Tipo Autor: - descricao diff --git a/materia/views.py b/materia/views.py index e5896330c..c64630270 100644 --- a/materia/views.py +++ b/materia/views.py @@ -76,18 +76,9 @@ class AnexadaCrud(MasterDetailCrud): class DetailView(MasterDetailCrud.DetailView): - def layout_display(self): - # context = super(MasterDetailCrud.DetailView, self).get_context_data(**kwargs) - # import ipdb; ipdb.set_trace() - # if self.object: - # context['tipo'] = self.object.materia_anexada.tipo - # context['numero'] = self.object.materia_anexada.numero - # context['ano'] = self.object.materia_anexada.ano - # context.update(context) - # return context - return [self.object.materia_anexada.tipo, - self.object.materia_anexada.numero, - self.object.materia_anexada.ano] + @property + def layout_key(self): + return 'AnexadaDetail' class MateriaLegislativaCrud(Crud): diff --git a/templates/materia/anexada_detail.html b/templates/materia/anexada_detail.html deleted file mode 100644 index 6b0c105d3..000000000 --- a/templates/materia/anexada_detail.html +++ /dev/null @@ -1,3 +0,0 @@ -{% extends "crud/detail.html" %} -{% block detail_content %} -{% endblock %}