def project_downloads(request, project_slug):
 project = get_object_or_404(Project.objects.protected(request.user), slug=project_slug)
 versions = Version.objects.public(user=request.user, project=project)
 version_data = SortedDict()
 for version in versions:
  data = version.get_downloads()
  if data:
   version_data[version] = data
 return render_to_response('projects/project_downloads.html', {'project': project, 'version_data': version_data, 'versions': versions}, context_instance=RequestContext(request))

def project_downloads ( request , project_slug ) : project = get_object_or_404 ( Project . objects . protected ( request . user ) , slug = project_slug ) versions = Version . objects . public ( user = request . user , project = project ) version_data = SortedDict ( ) for version in versions : data = version . get_downloads ( ) if data : version_data [ version ] = data return render_to_response ( 'projects/project_downloads.html' , { 'project' : project , 'version_data' : version_data , 'versions' : versions } , context_instance = RequestContext ( request ) )
a detail view for a project with various dataz .