def get_certificates_for_user(username):
 return [format_certificate_for_user(username, cert) for cert in GeneratedCertificate.eligible_certificates.filter(user__username=username).order_by('course_id')]

def get_certificates_for_user ( username ) : return [ format_certificate_for_user ( username , cert ) for cert in GeneratedCertificate . eligible_certificates . filter ( user__username = username ) . order_by ( 'course_id' ) ]
retrieve certificate information for a particular user .