For preparing cauliflower masala, immerse cauliflower florets in water with turmeric powder for some time. Drain, wash and keep it aside.
Heat 1 tbsp of oil in a pan and fry chana dhal, coconut, coriander powder, chopped shallots, red chilly powder and curry leaves. Let it cool for a while and then grind it into a fine paste with little water. Keep it aside.
Pour the rest of the oil into another pan and heat it. Add mustard seeds and when it begins to splutter, add sliced onion, green chillies and ginger. Fry for some time.
Add chopped tomatoes and saute for 2 minutes. Add the cauliflower florets and mix well.