  We show that the Weil representation associated with any discriminant form
admits a basis in which the action of the representation involves algebraic
integers. The action of a general element of
$\operatorname{SL}_{2}(\mathbb{Z})$ on many parts of these bases is simple an
explicit, a fact that we use for determining the dimension of the space of
invariants for some families of discriminant forms.
