To display a PDF file in Django.

<button class="download-btn"><a href="#">Download CV</a></button>
How to add a pdf file and when press the button pdf need to load on a new tab.?

Which part of that is a problem?

For us to be able to help you, you’ll need to provide a better explanation for what it is you’re trying to do here.

For example, you wrote:

Are you looking at adding this file as a static file resource on your site? (a “static” file), or this this going to be a file that a user would be uploading through a page? (a “media” file). How you handle this will be different depending upon which one of these matches your situation.

I am trying to build a website, where users need to view and download a pdf, its a static file.

This situation is the same regardless of whether it’s a pdf, js, css, or image.

Save it like any other static file and reference it like you would any other static file.

Ok, that clear now. But will it show in a separate tab in browser.

See <a>: The Anchor element - HTML: HyperText Markup Language | MDN

Ok its all clear now. I got it right.