#NEWLINE# def get_queryset( self ) : #NEWLINE# #INDENT# self . fallback = getattr ( settings , 'OPPS_MULTISITE_FALLBACK' , False ) #NEWLINE# self . site = get_current_site ( self . request ) #NEWLINE# self . site_master = Site . objects . order_by ( 'id' ) [ 0 ] #NEWLINE# self . long_slug = self . get_long_slug ( ) #NEWLINE# if ( not self . long_slug ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# self . set_channel_rules ( ) #NEWLINE# self . articleboxes = ContainerBox . objects . filter ( channel__long_slug = self . long_slug ) #NEWLINE# is_paginated = ( self . page_kwarg in self . request . GET ) #NEWLINE# if ( not is_paginated ) : #NEWLINE# #INDENT# for box in self . articleboxes : #NEWLINE# #INDENT# self . excluded_ids . update ( box . ordered_containers ( ) . values_list ( 'pk' , flat = True ) ) #NEWLINE# #UNINDENT# #UNINDENT# queryset = super ( ListView , self ) . get_queryset ( ) #NEWLINE# filters = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# filters [ 'site_domain__in' ] = [ self . site . domain ] #NEWLINE# filters [ 'channel_long_slug__in' ] = self . channel_long_slug #NEWLINE# filters [ 'date_available__lte' ] = timezone . now ( ) #NEWLINE# filters [ 'published' ] = True #NEWLINE# if ( self . channel and self . channel . is_root_node ( ) and ( not is_paginated ) ) : #NEWLINE# #INDENT# filters [ 'show_on_root_channel' ] = True #NEWLINE# #UNINDENT# if self . request . GET . get ( 'type' ) : #NEWLINE# #INDENT# filters [ 'child_class' ] = self . request . GET . get ( 'type' ) #NEWLINE# #UNINDENT# if ( self . fallback and ( self . site != self . site_master ) ) : #NEWLINE# #INDENT# filters . get ( 'site_domain__in' , [ ] ) . append ( self . site_master . domain ) #NEWLINE# #UNINDENT# queryset = queryset . filter ( ** filters ) #NEWLINE# if self . excluded_ids : #NEWLINE# #INDENT# queryset = queryset . exclude ( pk__in = self . excluded_ids ) #NEWLINE# #UNINDENT# mirror_excluded = [ mirror . id for mirror in Mirror . objects . filter ( container__channel_long_slug = self . long_slug ) ] #NEWLINE# queryset = queryset . exclude ( pk__in = mirror_excluded ) #NEWLINE# return queryset . _clone ( )