コード例 #1
0
ファイル: views.py プロジェクト: pxjacomex/sedc_v1
 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)
コード例 #2
0
ファイル: views.py プロジェクト: pxjacomex/sedc_v1
 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)
コード例 #3
0
ファイル: views.py プロジェクト: pxjacomex/sedc_v1
 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
コード例 #4
0
ファイル: views.py プロジェクト: pxjacomex/sedc_v1
 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
コード例 #5
0
ファイル: views.py プロジェクト: pxjacomex/sedc_v1
 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