Level densities for random one- or two-body potentials