Roll out the pastry on a floured surface to about 3mm/1/8in. thickness, and use it to line a 23cm/9in. flan case, ensuring that the lining comes up above the top of the case (do not trim it).
Line with foil then fill with rice, pasta, or ceramic beans, and bake blind for 10 minutes. (The foil and filling you choose will prevent the crust from bubbling.)
Remove the foil and its contents, and bake for a further 4 minutes.
Meanwhile, cut the leeks into approximately ½cm/1/4in. slices.
Melt the butter in a pan, add the leeks, and stir to coat.
Cover and cook over on low heat for 8 minutes.
Uncover and cook for a further 4-5 minutes.
Lightly beat the crème fraiche, milk, and eggs. Stir in the leeks and most of the cheese, and season well.
Pour into the flan case.
Sprinkle on the rest of the cheese and bake for 25 minutes, or until set. (A knife blade when inserted into the flan filling, careful not to pierce the crust, will come out clean when cooked.)