Django load URL in iFrame only

I need to load a url in iframe only. User can’t access the url directly.
Iframe is working. But, how can I restrict direct URL access in Django.

Thanks.