For the dough, combine flour and olive oil. Lightly which the egg and add to the flour, along with the milk, thyme and salt. Knead by hand and form a ball. Wrap in plastic film and refrigerate for 30 minutes.
Preheat the oven to 350F.
Grease a pie plate. Roll out the dough and line your pie plate. Dock your piecrust (use a fork or tip of a knife) Cover with parchment paper and cover with pie weights or dried beans. Blind bake for 10 minutes.
For the filling: If necessary, deseed the grapes and cut un half.
Peel the onion and cut into small dices. Put the onions and grapes in a bowl, sit in the oil and let stand.
In another bowl, whisk together egg and cheese. Add the hazelnuts and season with cumin, chili powder, salt and pepper. Combine well.
Cover the dough with the onions and grapes then pour the the egg/cheese mixtures on top
Bakes for 30 minutes and let cool.