Heat the oil in a large saucepan over a medium heat and add the onion, curry leaves, garlic and green chilli. Fry for 5 minutes, until the onions are golden brown, then add the mustard and fenugreek seeds and continue frying for another 5 minutes.
Toss the pumpkin in a bowl with the seeded mustard and ground spices and season with salt. Add to the pan along with the coconut milk and bring to the boil. Turn down to a simmer and cover.
Meanwhile, heat a small frying pan over a medium heat and dry-fry the rice and coconut until brown and fragrant (about 10 minutes). Grind to a powder in a mortar or blender.
Add the ground rice and coconut powder to the curry.
Season the curry with salt and continue to simmer, stirring occasionally, until the pumpkin is cooked – soft but still holding its shape. Serve with rice or flatbread.