Shawn
newbie here,
I'm running into a template syntax error where (as far as I can tell)
there shouldn't be one (yes, I've loaded my tags file before I tried
invoking my tag). I'm looking for help on how to debug it. I'm running
Django trunk.
I'm using template inheritance with a custom tag for pagination help.
I currently have "introContent.html" extending a "base.html" file. I
want to use a "pagination_links" tag from my "page_tags.py" tag file
(this example is from the Django e-commerce book)
---------------------------------------------
# In introContent.html
{% extends base.html %}
{% block content %}
{% load page_tags %}
{% pagination_links request paginator %}
{% endblock %}
---------------------------------------------
When I run this i get the error "expected 'endblock' or 'endblock
content".
Thanks for the response DR.
Isn't the "template tag library" already loaded in my example with
this line:
{% load page_tags %}
My pagination_links tag is in the page_tags.py file. So that should
work. Unless you are saying that the parent template (base.html that
introContent.html extends) needs to have a load statement in it too.
Is that what you are saying?
Just wondering b/c I don't really extract that meaning from the Djano
docs here:
http://docs.djangoproject.com/en/dev/topics/templates/#custom-libraries-and-template-inheritance
""""
When you load a custom tag or filter library, the tags/filters are
only made available to the current template -- not any parent or child
templates along the template-inheritance path.
"""