The centerpiece of Quentin Tarantino’s hit movie “Once Upon a Time … in Hollywood” is the filming of a TV pilot called “Lancer,” in which Rick Dalton (Leonardo DiCaprio) is cast as the heavy opposite real-life Hollywood actor James Stacy, played by Timothy Olyphant, best known as the star of the modern-day Western series “Justified” on FX and the latrine-lipped HBO Western “Deadwood.”

“Lancer” is not a pastiche of TV Westerns recalled fondly by Tarantino; it was an actual CBS Western that aired Tuesday nights at 7:30 for two seasons beginning in 1968. Stacy’s co-star in the series was actor Wayne Maunder (played here by Luke Perry). The series also starred popular character actor Andrew Duggan. All three leads are dead.

“Lancer” is the story of a rancher (Duggan) who struggles to hang onto his vast holdings in California’s San Joaquin Valley with the help of his two sons, Scott (Maunder) and Johnny Madrid (Stacy), whose exotic middle name comes by way of his Mexican mother (yes, there’s a slight disconnect here but no one seemed to notice in 1968).

In Tarantino’s film, Rick Dalton views the “Lancer” pilot as one more sign that his career is grinding to a halt. He drinks too much the night before filming commences and can’t remember his lines, castigating himself afterward in his trailer in one of the film’s funniest sequences. The only future that awaits him is a career in Spaghetti Westerns.

In real life, “Lancer” premiered at the tail end of the heyday of network TV Westerns such as NBC’s sturdy hits “Bonanza” and “High Chaparral,” as well as ABC’s “The Big Valley,” which starred Barbara Stanwyck, who was so butch she did her own stunts, and launched the careers of Lee Majors and Linda Evans.

Guest stars on “Lancer” included popular actors of the day such as Stefanie Powers, whose own series “The Girl From U.N.C.L.E” is referenced by Tarantino in the film; Bruce Dern, who has a cameo in “Once Upon a Time in Hollywood” as George Spahn, owner of the old Hollywood ranch where “Bonanza” was shot and the Manson family freeloaded; and Cloris Leachman , who a few years later went on to Emmy- and Oscar-winning glory with “The Mary Tyler Moore Show” and “The Last Picture Show.”

Perry makes one of his final appearances in “Once Upon a Time … in Hollywood” as Scott Lancer, the role played by Maunder. The actor, who died of a massive stroke earlier this year, was a regular on The CW’s “Riverdale” and will receive a tribute on that show when it returns in September. He will also be remembered when the reboot of “Beverly Hills 90210” debuts in August on Fox.