#NEWLINE# def get_urls( self ) : #NEWLINE# #INDENT# original_urls = super ( AdminViews , self ) . get_urls ( ) #NEWLINE# added_urls = [ ] #NEWLINE# for link in self . admin_views : #NEWLINE# #INDENT# if hasattr ( self , link [ 1 ] ) : #NEWLINE# #INDENT# view_func = getattr ( self , link [ 1 ] ) #NEWLINE# if ( len ( link ) == 3 ) : #NEWLINE# #INDENT# view_func = permission_required ( link [ 2 ] , raise_exception = True ) ( view_func ) #NEWLINE# #UNINDENT# added_urls . extend ( patterns ( '' , url ( regex = ( '%s' % link [ 1 ] ) , name = link [ 1 ] , view = self . admin_site . admin_view ( view_func ) ) ) ) #NEWLINE# self . local_view_names . append ( link [ 0 ] ) #NEWLINE# try : #NEWLINE# #INDENT# model_name = self . model . _meta . model_name #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# model_name = self . model . _meta . module_name #NEWLINE# #UNINDENT# info = ( self . model . _meta . app_label , model_name ) #NEWLINE# self . output_urls . append ( ( 'view' , link [ 0 ] , ( '%s/%s/%s/%s' % ( ADMIN_URL_PREFIX , info [ 0 ] , info [ 1 ] , link [ 1 ] ) ) , ( link [ 2 ] if ( len ( link ) == 3 ) else None ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . direct_links . append ( link ) #NEWLINE# self . output_urls . append ( ( 'url' , link [ 0 ] , link [ 1 ] , ( link [ 2 ] if ( len ( link ) == 3 ) else None ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# return ( self + original_urls )