|
|
|
@ -14,7 +14,7 @@ from django.core.urlresolvers import reverse |
|
|
|
from django.http import HttpResponse, JsonResponse |
|
|
|
from django.http.response import Http404, HttpResponseRedirect |
|
|
|
from django.shortcuts import get_object_or_404, redirect |
|
|
|
from django.template import loader, RequestContext |
|
|
|
from django.template import RequestContext, loader |
|
|
|
from django.utils import formats |
|
|
|
from django.utils.translation import ugettext_lazy as _ |
|
|
|
from django.views.generic import CreateView, ListView, TemplateView, UpdateView |
|
|
|
@ -1848,6 +1848,7 @@ class FichaPesquisaView(PermissionRequiredMixin, FormView): |
|
|
|
|
|
|
|
return HttpResponseRedirect(url) |
|
|
|
|
|
|
|
|
|
|
|
class FichaSelecionaView(PermissionRequiredMixin, FormView): |
|
|
|
form_class = FichaSelecionaForm |
|
|
|
template_name = 'materia/impressos/ficha_seleciona.html' |
|
|
|
@ -1875,7 +1876,8 @@ class FichaSelecionaView(PermissionRequiredMixin, FormView): |
|
|
|
context['quantidade'] = len(materia_list) |
|
|
|
materia_list = materia_list[:20] |
|
|
|
|
|
|
|
context['form'].fields['materia'].choices = [(m.id, str(m)) for m in materia_list] |
|
|
|
context['form'].fields['materia'].choices = [ |
|
|
|
(m.id, str(m)) for m in materia_list] |
|
|
|
|
|
|
|
if context['quantidade'] > 20: |
|
|
|
messages.info(self.request, _('Sua pesquisa retornou mais do que ' |
|
|
|
|