abstract: We consider the weakly asymmetric exclusion process in a bounded interval with particles' reservoirs at the endpoints. We prove the dynamical large deviation principle associated to the hydrodynamic limit and study the associated variational problem defining the quasi potential. We then consider the limit in which the asymmetry diverges and show that the rate function of the asymmetric exclusion process is recovered. We finally discuss the large deviations properties of weakly asymmetric "non gradient" models with periodic boundary conditions.