I have created Ad units and generated tags for displaying the ads in my website from The DFP dashboard. It works fine when I simply make an html file with the code generated. But when I try to integrate the same code with my website, the ads are not rendering. When I checked in the google console it shows the iframe type to be none and for the simply html file, the iframe type is SafeFrame.
The problem was with my IP. When I run the django server on localhost instead of my IP, google ads got rendered.