For the base, mix the flour, lard, pepper, salt and cheddar together and then add the crème fraîche. Knead until you have a smooth dough - this may take a while. Roll out the dough on a thinly floured work surface, place in the mold and refrigerate until ready to use.
Peel the sweet potatoes and cut into cubes, peel the onions and cut into thin rings (put a few aside for decoration).
Now fry the onion rings in clarified butter and sprinkle with sugar. Add the sweet potato cubes and fry everything for about 5 minutes. Grate the cheese in time. Mix the cream and eggs and add the cheese. Season everything vigorously with salt and pepper.
Place the potato and onion mixture on the quiche dough and pour the cream mixture over it. Decorate with the remaining onion rings. Sprinkle rosemary on top.
Preheat the oven to 200 degrees top / bottom heat. Bake the quiche for about 35 minutes, until it is golden brown.