#NEWLINE# @ method_decorator ( login_required ) #NEWLINE# def dispatch( self , request , * args , **kwargs ) : #NEWLINE# #INDENT# if ( not self . permission_helper . user_can_list ( request . user ) ) : #NEWLINE# #INDENT# raise PermissionDenied #NEWLINE# #UNINDENT# self . list_display = self . model_admin . get_list_display ( request ) #NEWLINE# self . list_filter = self . model_admin . get_list_filter ( request ) #NEWLINE# self . search_fields = self . model_admin . get_search_fields ( request ) #NEWLINE# self . items_per_page = request . model_admin . list_per_page #NEWLINE# self . select_related = self . model_admin . list_select_related #NEWLINE# try : #NEWLINE# #INDENT# self . page_num = int ( request . GET . get ( self . PAGE_VAR , 0 ) ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# self . page_num = 0 #NEWLINE# #UNINDENT# self . params = dict ( request . GET . items ( ) ) #NEWLINE# if ( self . PAGE_VAR in self . params ) : #NEWLINE# #INDENT# del self . params [ self . PAGE_VAR ] #NEWLINE# #UNINDENT# if ( self . ERROR_FLAG in self . params ) : #NEWLINE# #INDENT# del self . params [ self . ERROR_FLAG ] #NEWLINE# #UNINDENT# self . query = request . GET . get ( self . SEARCH_VAR , '' ) #NEWLINE# self . queryset = self . get_queryset ( request ) #NEWLINE# return super ( IndexView , self ) . dispatch ( request , * args , ** kwargs )