#NEWLINE# def get( self , request , repo , slug ) : #NEWLINE# #INDENT# condition = Q ( ) #NEWLINE# for name in get_search_names ( slug ) : #NEWLINE# #INDENT# condition |= Q ( name__iexact = name ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# package = self . repository . packages . get ( condition ) #NEWLINE# #UNINDENT# except ObjectDoesNotExist : #NEWLINE# #INDENT# if ( not self . repository . enable_auto_mirroring ) : #NEWLINE# #INDENT# raise Http404 ( 'Auto mirroring is not enabled' ) #NEWLINE# #UNINDENT# enqueue ( fetch_package , self . repository . pk , slug ) #NEWLINE# return redirect ( ( ( self . repository . upstream_pypi_url + '/' ) + slug ) ) #NEWLINE# #UNINDENT# if ( slug != package . name ) : #NEWLINE# #INDENT# url = reverse ( 'packages:simple_detail' , kwargs = { #NEWLINE# #INDENT# 'repo' : self . repository . slug , #NEWLINE# 'slug' : package . name , #NEWLINE# #UNINDENT# } ) #NEWLINE# return redirect ( url ) #NEWLINE# #UNINDENT# self . object = package #NEWLINE# context = self . get_context_data ( object = self . object , releases = list ( package . releases . all ( ) ) ) #NEWLINE# return self . render_to_response ( slug )