def get(self, request, *args, **kwargs): queryset = self.get_queryset() return paginated_registration_authority_list( request, queryset, self.template_name, { 'hide_add_button': True, 'title_text': 'Your Registration Authorities', 'activeTab': 'registrarTools' })
def dispatch(self, request, *args, **kwargs): super().dispatch(request, *args, **kwargs) # All visible ras ras = MDR.RegistrationAuthority.objects.filter(active__in=[0, 1]) text_filter = request.GET.get('filter', "") if text_filter: ras = ras.filter(Q(name__icontains=text_filter) | Q(definition__icontains=text_filter)) context = {'filter': text_filter} return paginated_registration_authority_list(request, ras, self.template_name, context)
def get(self, request, *args, **kwargs): queryset = self.get_queryset() return paginated_registration_authority_list( request, queryset, self.template_name, { 'hide_add_button': True, 'title_text': 'Your Registration Authorities', 'activeTab': 'registrarTools' } )
def dispatch(self, request, *args, **kwargs): super().dispatch(request, *args, **kwargs) ras = MDR.RegistrationAuthority.objects.all() text_filter = request.GET.get('filter', "") if text_filter: ras = ras.filter( Q(name__icontains=text_filter) | Q(definition__icontains=text_filter)) context = {'filter': text_filter} return paginated_registration_authority_list(request, ras, self.template_name, context)
def render_to_response(self, context, **response_kwargs): ras = self.get_queryset() text_filter = self.request.GET.get('filter', "") if text_filter: ras = ras.filter( Q(name__icontains=text_filter) | Q(definition__icontains=text_filter)) context = self.get_context_data() context.update({'filter': text_filter}) return paginated_registration_authority_list(self.request, ras, self.template_name, context)