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:
Malcolm Tredinnick 2007-09-15 15:57:17 +00:00
parent 951ecbf7e6
commit d30badc0ec
2 changed files with 2 additions and 1 deletions

View File

@ -270,6 +270,7 @@ answer newbie questions, and generally made Django that much better:
sopel
Leo Soto <leo.soto@gmail.com>
Wiliam Alves de Souza <wiliamsouza83@gmail.com>
Bjørn Stabell <bjorn@exoweb.net>
Georgi Stanojevski <glisha@gmail.com>
Vasiliy Stavenko <stavenko@gmail.com>
Thomas Steinacher <http://www.eggdrop.ch/>

View File

@ -795,7 +795,7 @@ def load(parser, token):
for taglib in bits[1:]:
# add the library to the parser
try:
lib = get_library("django.templatetags.%s" % taglib.split('.')[-1])
lib = get_library("django.templatetags.%s" % taglib)
parser.add_library(lib)
except InvalidTemplateLibrary, e:
raise TemplateSyntaxError, "'%s' is not a valid tag library: %s" % (taglib, e)