11
votes

I don't understand the error. It complains for endif while it is there.

{% if pdf_enable %}
    {% download_url request.get_full_path "Download as Excel" %}
{% endif %}

Am I missing something?

1
Might be helpful to post the full template - Austin
Have you remembered to load the module containing the download_url template tag? - Alasdair
Just came back to answer and surprised to find 2 replies already. Thanks for replying my Stack buddies... :D @Alasdair: You are right I had forgotten to add what you have mentioned. Came back to say that and found you very accurate answer. :) How to close this thread now??? :/ - Abhilash Nanda
I've added the comment as an answer, so you can mark it as accepted. - Alasdair

1 Answers

13
votes

You need to load the custom template tag set containing the download_url tag.

For example, if the download_url tag was in a module called download_tags, you would add the following to your template.

{% load download_tags %}