Opened 13 years ago
Closed 13 years ago
#16787 closed Bug (fixed)
{% load %} doesn't work with libraries in package heierarcy
Reported by: | Ivan Sagalaev | Owned by: | Ivan Sagalaev |
---|---|---|---|
Component: | Template system | Version: | 1.3 |
Severity: | Release blocker | Keywords: | |
Cc: | chris@… | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
In other words {% load package.lib %} doesn't work.
The docstring of load tag suggests it should work and it used to work before changeset r12944. We should allow this behavior again and document it properly in docs.
Attachments (5)
Change History (12)
comment:1 by , 13 years ago
Description: | modified (diff) |
---|---|
Severity: | Normal → Release blocker |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 13 years ago
Cc: | added |
---|---|
Type: | Uncategorized → Bug |
I'm getting a test failure:
python runtests.py --settings=test_sqlite templates
TemplateSyntaxError: 'subpackage.echo' is not a valid tag library: Template library subpackage.echo not found, tried django.templatetags.subpackage.echo,django.contrib.flatpages.templatetags.subpackage.echo,django.contrib.comments.templatetags.subpackage.echo,django.contrib.admin.templatetags.subpackage.echo,django.contrib.staticfiles.templatetags.subpackage.echo,django.contrib.humanize.templatetags.subpackage.echo,regressiontests.templates.templatetags.subpackage.echo
comment:3 by , 13 years ago
Has patch: | set |
---|---|
Triage Stage: | Accepted → Ready for checkin |
The patch includes an empty __init__.py
file which didn't get added for me when I applied it. Running this fixes it:
touch tests/regressiontests/templates/templatetags/subpackage/__init__.py
I reviewed the patch with Ivan at the sprint today and I'm happy with v4. As he said in the description, this functionality used to exist, so we don't think there's a need for a separate section in the docs explaining it.
comment:5 by , 13 years ago
I did a lot of research on this problem recently and the best solution I've found is to generate the diff with git — but that only works if you apply it with "git apply".
comment:6 by , 13 years ago
This won't work for me since I use bzr :-). This is the one place where standardizing on svn and patch
utility sucks…
This is a regression and therefore a release blocker.