def user_avatar(request, user, size):
 user = get_object_or_404(User, username=user)
 if (user.email == u'noreply@weblate.org'):
  return redirect(get_fallback_avatar_url(size))
 response = HttpResponse(content_type=u'image/png', content=get_avatar_image(request, user, size))
 patch_response_headers(response, ((3600 * 24) * 7))
 return response

def user_avatar ( request , user , size ) : user = get_object_or_404 ( User , username = user ) if ( user . email == u'noreply@weblate.org' ) : return redirect ( get_fallback_avatar_url ( size ) ) response = HttpResponse ( content_type = u'image/png' , content = get_avatar_image ( request , user , size ) ) patch_response_headers ( response , ( ( 3600 * 24 ) * 7 ) ) return response
user avatar page .