@login_required
@require_GET
def program_details(request, program_id):
 programs_config = ProgramsApiConfig.current()
 if (not programs_config.show_program_details):
  raise Http404
 try:
  uuid.UUID(program_id)
  program_data = get_catalog_programs(request.user, uuid=program_id)
  if program_data:
   program_data = munge_catalog_program(program_data)
 except ValueError:
  program_data = utils.get_programs(request.user, program_id=program_id)
 if (not program_data):
  raise Http404
 program_data = utils.ProgramDataExtender(program_data, request.user).extend()
 urls = {'program_listing_url': reverse('program_listing_view'), 'track_selection_url': strip_course_id(reverse('course_modes_choose', kwargs={'course_id': FAKE_COURSE_KEY})), 'commerce_api_url': reverse('commerce_api:v0:baskets:create')}
 context = {'program_data': program_data, 'urls': urls, 'show_program_listing': programs_config.show_program_listing, 'nav_hidden': True, 'disable_courseware_js': True, 'uses_pattern_library': True, 'user_preferences': get_user_preferences(request.user)}
 return render_to_response('learner_dashboard/program_details.html', context)

@ login_required @ require_GET def program_details ( request , program_id ) : programs_config = ProgramsApiConfig . current ( ) if ( not programs_config . show_program_details ) : raise Http404 try : uuid . UUID ( program_id ) program_data = get_catalog_programs ( request . user , uuid = program_id ) if program_data : program_data = munge_catalog_program ( program_data ) except ValueError : program_data = utils . get_programs ( request . user , program_id = program_id ) if ( not program_data ) : raise Http404 program_data = utils . ProgramDataExtender ( program_data , request . user ) . extend ( ) urls = { 'program_listing_url' : reverse ( 'program_listing_view' ) , 'track_selection_url' : strip_course_id ( reverse ( 'course_modes_choose' , kwargs = { 'course_id' : FAKE_COURSE_KEY } ) ) , 'commerce_api_url' : reverse ( 'commerce_api:v0:baskets:create' ) } context = { 'program_data' : program_data , 'urls' : urls , 'show_program_listing' : programs_config . show_program_listing , 'nav_hidden' : True , 'disable_courseware_js' : True , 'uses_pattern_library' : True , 'user_preferences' : get_user_preferences ( request . user ) } return render_to_response ( 'learner_dashboard/program_details.html' , context )
view details about a specific program .