#NEWLINE# def packages_to_dict( request , packages ) : #NEWLINE# #INDENT# ' Convert a list of packages to a dict used by the template ' #NEWLINE# pkgs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for package in packages : #NEWLINE# #INDENT# pkgs [ package . filename ] = package . get_url ( request ) #NEWLINE# #UNINDENT# return pkgs