diff --git a/norma/views.py b/norma/views.py index ea6225f55..23f0c1b6f 100644 --- a/norma/views.py +++ b/norma/views.py @@ -5,7 +5,6 @@ from crispy_forms.helper import FormHelper from crispy_forms.layout import ButtonHolder, Fieldset, Layout, Submit from django import forms from django.core.exceptions import ObjectDoesNotExist -from django.core.urlresolvers import reverse from django.forms import ModelForm from django.utils.html import strip_tags from django.utils.safestring import mark_safe diff --git a/painel/models.py b/painel/models.py index 026e6dfdb..a98dd4e15 100644 --- a/painel/models.py +++ b/painel/models.py @@ -13,6 +13,7 @@ class Painel(models.Model): data_painel = models.DateField(verbose_name='Data painel') mostrar = models.CharField(max_length=1, choices=PAINEL_TYPES, default='C') + def __str__(self): return str(self.aberto) + ":" + self.data_painel.strftime("%d/%m/%Y") diff --git a/painel/views.py b/painel/views.py index 924c81ff3..d46a030be 100644 --- a/painel/views.py +++ b/painel/views.py @@ -4,6 +4,7 @@ from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponse, JsonResponse from django.shortcuts import render from django.utils.translation import ugettext_lazy as _ + from painel.models import Painel from parlamentares.models import Filiacao from sapl.crud import build_crud