To begin, dice the pumpkin into bite-sized pieces and keep aside.
Heat oil in a pan. Add in mustard seeds (sarson), chana dal (split chickpea), and urad dal (split black gram).
Add whole red chillies broken into two, curry leaves, and asafoetida (hing). Saute until the dals begin to colorize.
Add in the chopped onions and green chillies. Saute until the onions are translucent.
Now add in the diced pumpkin with the salt and turmeric powder. Mix well.
Add a bit of water, cover with a lid, and cook until the pumpkin is done and the liquid dries up.
Finally, add the sugar and the grated coconut. Mix well.
The Sweet and Spicy Pumpkin Poriyal is ready to serve. Garnish with grated coconut. Serve hot with rice.