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

I do not understand the error. He complains about endif while he is.

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

Did I miss something?

+8
django django-templates
source share
1 answer

You need to download a custom template tag containing the download_url tag.

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

 {% load download_tags %} 
+11
source share

All Articles