Ticket #10067: tagload.diff
File tagload.diff, 1.5 KB (added by , 16 years ago) |
---|
-
django/conf/global_settings.py
old new 169 169 # Output to use in template system for invalid (e.g. misspelled) variables. 170 170 TEMPLATE_STRING_IF_INVALID = '' 171 171 172 # Base to search for tags to {% load %} 173 TEMPLATE_MODULES=( 'django.templatetags', ) 174 172 175 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a 173 176 # trailing slash. 174 177 # Examples: "http://foo.com/media/", "/media/". -
django/template/defaulttags.py
old new 872 872 bits = token.contents.split() 873 873 for taglib in bits[1:]: 874 874 # add the library to the parser 875 try: 876 lib = get_library("django.templatetags.%s" % taglib) 877 parser.add_library(lib) 878 except InvalidTemplateLibrary, e: 879 raise TemplateSyntaxError("'%s' is not a valid tag library: %s" % 880 (taglib, e)) 875 resolved = False 876 for mod in settings.TEMPLATE_MODULES: 877 try: 878 lib = get_library("%s.%s" % (mod, taglib)) 879 parser.add_library(lib) 880 resolved = True 881 break 882 except InvalidTemplateLibrary: 883 pass 884 if not resolved: 885 raise TemplateSyntaxError("'%s' is not a valid tag library" % taglib) 881 886 return LoadNode() 882 887 load = register.tag(load) 883 888