Hassn Irshaad Hassn Irshaad - 5 months ago 42
HTML Question

How to make a pdf link in Django

I'm extremely new to Django and I was hoping someone could help me add a link to my website which allows someone to download a pdf file. The pdf file is located here:


and I have no idea what the URL should be in the urls.py file or the view in the views.py file. I have looked around but nothing is working as I want it too.

Any help would be great, thanks!

Art Art

This will answer your questions.


If it still confuses you, {% load static %} <img src="{% static "my_app/example.jpg" %}" alt="My image"/> is an example of what should be in your template.