Abhilash Nanda
Abhilash Nanda

Reputation: 359

Invalid block tag: expected 'elif', 'else' or 'endif'

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?

Upvotes: 12

Views: 11823

Answers (1)

Alasdair
Alasdair

Reputation: 309089

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 %}

Upvotes: 14

Related Questions