@addon_valid_disabled_pending_view
@non_atomic_requests
def addon_detail(request, addon):
 if (addon.is_deleted or (addon.is_pending() and (not addon.is_persona()))):
  raise http.Http404
 if addon.is_disabled:
  return render(request, 'addons/impala/disabled.html', {'addon': addon}, status=404)
 if (addon.type in request.APP.types):
  if (addon.type == amo.ADDON_PERSONA):
   return persona_detail(request, addon)
  else:
   if (not addon.current_version):
    raise http.Http404
   return extension_detail(request, addon)
 else:
  try:
   new_app = [a for a in amo.APP_USAGE if (addon.type in a.types)][0]
  except IndexError:
   raise http.Http404
  else:
   prefixer = urlresolvers.get_url_prefix()
   prefixer.app = new_app.short
   return http.HttpResponsePermanentRedirect(reverse('addons.detail', args=[addon.slug]))

@ addon_valid_disabled_pending_view @ non_atomic_requests def addon_detail ( request , addon ) : if ( addon . is_deleted or ( addon . is_pending ( ) and ( not addon . is_persona ( ) ) ) ) : raise http . Http404 if addon . is_disabled : return render ( request , 'addons/impala/disabled.html' , { 'addon' : addon } , status = 404 ) if ( addon . type in request . APP . types ) : if ( addon . type == amo . ADDON_PERSONA ) : return persona_detail ( request , addon ) else : if ( not addon . current_version ) : raise http . Http404 return extension_detail ( request , addon ) else : try : new_app = [ a for a in amo . APP_USAGE if ( addon . type in a . types ) ] [ 0 ] except IndexError : raise http . Http404 else : prefixer = urlresolvers . get_url_prefix ( ) prefixer . app = new_app . short return http . HttpResponsePermanentRedirect ( reverse ( 'addons.detail' , args = [ addon . slug ] ) )
add-ons details page dispatcher .