Magnetic fields are sometimes used to confine the plasma in low-pressure low-temperature gas discharges, for example in magnetron discharges, Hall-effect-thruster discharges, electron-cyclotron-resonance discharges and helicon discharges. We discuss how these magnetized discharges can be modelled by two-dimensional self-consistent models based on electron fluid equations. The magnetized electron flux is described by an anisotropic drift–diffusion equation, where the electron mobility is much smaller perpendicular to the magnetic field than parallel to it. The electric potential is calculated either from Poisson's equation or from the electron equations, assuming quasineutrality. Although these models involve many assumptions, they are appropriate to study the main effects of the magnetic field on the charged particle transport and space charge electric fields in realistic two-dimensional discharge configurations. We demonstrate by new results that these models reproduce known phenomena such as the establishment of the Boltzmann relation along magnetic field lines, the penetration of perpendicular applied electric fields into the plasma bulk and the decrease in magnetic confinement by short-circuit wall currents. We also present an original method to prevent numerical errors arising from the extreme anisotropy of the electron mobility, which tend to invalidate model results from standard numerical methods.