John Singleton will get a fitting tribute on his last big project ... and it was no small feat to pull it off.
"Snowfall" -- the FX series Singleton co-created that chronicles L.A.'s crack epidemic in the '80s -- did an entire rewrite of the upcoming third season's finale to incorporate a young John character into the story ... based on his pre-"Boyz n the Hood" days.
Sources close to production tell us everyone involved really wanted to honor him this way, and worked very hard with little time to make it happen.
There's more -- we're told Singleton's 1-year-old son, Seven, will make a cameo in episode 10 as well ... which would have made his father ecstatic.
Our sources say John always had his boy on set and expressed his wish to eventually have him appear on "Snowfall" ... so producers checked that off the list too.
Little Seven spent some time with the show's stars between takes, and you can see ... he definitely upped the cuteness factor of the gritty drama.