"Diwali" was written by Mindy Kaling and directed by Miguel Arteta.While the episode is partly set at West Scranton High School, filming actually took place at Grant High School in Los Angeles, the same building where "Freaks and Geeks" was shot.