def post(self, request, *args, **kwargs): form=SensorSearchForm(self.request.POST or None) page=kwargs.get('page') if form.is_valid() and self.request.is_ajax(): self.object_list=form.filtrar(form) else: self.object_list=Sensor.objects.all() context = super(SensorList, self).get_context_data(**kwargs) context.update(pagination(self.object_list,page,10)) return render(request,'sensor/sensor_table.html',context)
def post(self, request, *args, **kwargs): form = FormatoSearchForm(self.request.POST or None) page = kwargs.get('page') if form.is_valid(): self.object_list = form.filtrar(form) else: self.object_list = Formato.objects.all() context = super(FormatoList, self).get_context_data(**kwargs) context.update(pagination(self.object_list, page, 10)) return render(request, 'formato/formato_table.html', context)
def get_context_data(self, **kwargs): context = super(SensorList, self).get_context_data(**kwargs) page=self.request.GET.get('page') context.update(pagination(self.object_list,page,10)) return context
def get_context_data(self, **kwargs): context = super(AsociacionList, self).get_context_data(**kwargs) page = self.request.GET.get('page') context.update(pagination(self.object_list, page, 10)) context["cadena"] = self.cadena return context
def get_context_data(self, **kwargs): context = super(DelimitadorList, self).get_context_data(**kwargs) lista = Delimitador.objects.all() page = self.request.GET.get('page') context.update(pagination(self.object_list, page, 10)) return context