  In this paper we state the variational principle for the weighted porous
media equation. It extends V.I. Arnold's approach to the description of Euler
flows as a geodesics on some manifold, i.e. as a critical points of some energy
functional.
