Fixed #5243 -- Allow loading of templatetags from subdirectories (via dotted notation in {% load %}). Thanks, Bjørn Stabell.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6289 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
951ecbf7e6
commit
d30badc0ec
1
AUTHORS
1
AUTHORS
|
@ -270,6 +270,7 @@ answer newbie questions, and generally made Django that much better:
|
||||||
sopel
|
sopel
|
||||||
Leo Soto <leo.soto@gmail.com>
|
Leo Soto <leo.soto@gmail.com>
|
||||||
Wiliam Alves de Souza <wiliamsouza83@gmail.com>
|
Wiliam Alves de Souza <wiliamsouza83@gmail.com>
|
||||||
|
Bjørn Stabell <bjorn@exoweb.net>
|
||||||
Georgi Stanojevski <glisha@gmail.com>
|
Georgi Stanojevski <glisha@gmail.com>
|
||||||
Vasiliy Stavenko <stavenko@gmail.com>
|
Vasiliy Stavenko <stavenko@gmail.com>
|
||||||
Thomas Steinacher <http://www.eggdrop.ch/>
|
Thomas Steinacher <http://www.eggdrop.ch/>
|
||||||
|
|
|
@ -795,7 +795,7 @@ def load(parser, token):
|
||||||
for taglib in bits[1:]:
|
for taglib in bits[1:]:
|
||||||
# add the library to the parser
|
# add the library to the parser
|
||||||
try:
|
try:
|
||||||
lib = get_library("django.templatetags.%s" % taglib.split('.')[-1])
|
lib = get_library("django.templatetags.%s" % taglib)
|
||||||
parser.add_library(lib)
|
parser.add_library(lib)
|
||||||
except InvalidTemplateLibrary, e:
|
except InvalidTemplateLibrary, e:
|
||||||
raise TemplateSyntaxError, "'%s' is not a valid tag library: %s" % (taglib, e)
|
raise TemplateSyntaxError, "'%s' is not a valid tag library: %s" % (taglib, e)
|
||||||
|
|
Loading…
Reference in New Issue