#NEWLINE# def public_objectview( request , account , container , prefix = None ) : #NEWLINE# #INDENT# ' Returns list of all objects in current container. ' #NEWLINE# storage_url = ( settings . STORAGE_URL + account ) #NEWLINE# auth_token = ' ' #NEWLINE# try : #NEWLINE# #INDENT# ( _meta , objects ) = client . get_container ( storage_url , auth_token , container , delimiter = '/' , prefix = prefix ) #NEWLINE# #UNINDENT# except client . ClientException : #NEWLINE# #INDENT# messages . add_message ( request , messages . ERROR , _ ( 'Access denied.' ) ) #NEWLINE# return redirect ( containerview ) #NEWLINE# #UNINDENT# prefixes = prefix_list ( prefix ) #NEWLINE# ( pseudofolders , objs ) = pseudofolder_object_list ( objects , prefix ) #NEWLINE# base_url = get_base_url ( request ) #NEWLINE# account = storage_url . split ( '/' ) [ ( - 1 ) ] #NEWLINE# return render_to_response ( 'publicview.html' , { #NEWLINE# #INDENT# 'container' : container , #NEWLINE# 'objects' : objs , #NEWLINE# 'folders' : pseudofolders , #NEWLINE# 'prefix' : prefix , #NEWLINE# 'prefixes' : prefixes , #NEWLINE# 'base_url' : base_url , #NEWLINE# 'storage_url' : storage_url , #NEWLINE# 'account' : account , #NEWLINE# #UNINDENT# } , context_instance = RequestContext ( request ) )