One of the most active fields of research of modern-day astrophysics is that of massive black hole formation and co-evolution with the host galaxy. In these investigations, ranging from cosmological simulations, to semi-analytical modeling, to observational studies, the Bondi solution for accretion on a central point mass is widely adopted. In this work we generalize the classical Bondi accretion theory to take into account the effects of the gravitational potential of the host galaxy, and of radiation pressure in the optically thin limit. Then, we present the fully analytical solution, in terms of the Lambert-Euler $W$-function, for isothermal accretion in Jaffe and Hernquist galaxies with a central black hole. The flow structure is found to be sensitive to the shape of the mass profile of the host galaxy. These results and the formulae that are provided, mostly important the one for the critical accretion parameter, allow for a direct evaluation of all flow properties, and are then useful for the above mentioned studies. As an application, we examine the departure from the true mass accretion rate of estimates obtained using the gas properties at various distances from the black hole, under the hypothesis of classical Bondi accretion. An overestimate is obtained from regions close to the black hole, and an underestimate outside a few Bondi radii; the exact position of the transition between the two kinds of departure depends on the galaxy model.