def author_addon_clicked(f):
 @functools.wraps(f)
 def decorated(request, *args, **kwargs):
  redirect_id = request.GET.get('addons-author-addons-select', None)
  if (not redirect_id):
   return f(request, *args, **kwargs)
  try:
   target_id = int(redirect_id)
   return http.HttpResponsePermanentRedirect(reverse('addons.detail', args=[target_id]))
  except ValueError:
   return http.HttpResponseBadRequest('Invalid add-on ID.')
 return decorated

def author_addon_clicked ( f ) : @ functools . wraps ( f ) def decorated ( request , * args , ** kwargs ) : redirect_id = request . GET . get ( 'addons-author-addons-select' , None ) if ( not redirect_id ) : return f ( request , * args , ** kwargs ) try : target_id = int ( redirect_id ) return http . HttpResponsePermanentRedirect ( reverse ( 'addons.detail' , args = [ target_id ] ) ) except ValueError : return http . HttpResponseBadRequest ( 'Invalid add-on ID.' ) return decorated
decorator redirecting clicks on "other add-ons by author" .