Admissible function spaces for weighted Sobolev inequalities