#NEWLINE# def __init__( self , request , model , list_display , list_display_links , list_filter , date_hierarchy , search_fields , list_select_related , list_per_page , list_max_show_all , list_editable , model_admin ) : #NEWLINE# #INDENT# self . model = model #NEWLINE# self . opts = model . _meta #NEWLINE# self . lookup_opts = self . opts #NEWLINE# self . root_query_set = model_admin . queryset ( request ) #NEWLINE# self . list_display = list_display #NEWLINE# self . list_display_links = list_display_links #NEWLINE# self . list_filter = list_filter #NEWLINE# self . date_hierarchy = date_hierarchy #NEWLINE# self . search_fields = search_fields #NEWLINE# self . list_select_related = list_select_related #NEWLINE# self . list_per_page = list_per_page #NEWLINE# self . list_max_show_all = list_max_show_all #NEWLINE# self . model_admin = model_admin #NEWLINE# try : #NEWLINE# #INDENT# self . page_num = int ( request . GET . get ( PAGE_VAR , 0 ) ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# self . page_num = 0 #NEWLINE# #UNINDENT# self . show_all = ( ALL_VAR in request . GET ) #NEWLINE# self . is_popup = ( IS_POPUP_VAR in request . GET ) #NEWLINE# self . to_field = request . GET . get ( TO_FIELD_VAR ) #NEWLINE# self . params = dict ( request . GET . items ( ) ) #NEWLINE# if ( PAGE_VAR in self . params ) : #NEWLINE# #INDENT# del self . params [ PAGE_VAR ] #NEWLINE# #UNINDENT# if ( ERROR_FLAG in self . params ) : #NEWLINE# #INDENT# del self . params [ ERROR_FLAG ] #NEWLINE# #UNINDENT# if self . is_popup : #NEWLINE# #INDENT# self . list_editable = ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . list_editable = list_editable #NEWLINE# #UNINDENT# self . query = request . GET . get ( SEARCH_VAR , '' ) #NEWLINE# self . query_set = self . get_query_set ( request ) #NEWLINE# self . get_results ( request ) #NEWLINE# if self . is_popup : #NEWLINE# #INDENT# title = ugettext ( 'Select %s' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# title = ugettext ( 'Select %s to change' ) #NEWLINE# #UNINDENT# self . title = ( title % force_text ( self . opts . verbose_name ) ) #NEWLINE# self . pk_attname = self . lookup_opts . pk . attname