File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ def get_template_dirs():
143143 """
144144 from django .conf import settings
145145 dirs = set ()
146- if ('django.template.loaders.filesystem.load_template_source' in settings .TEMPLATE_LOADERS
146+ if ('django.template.loaders.filesystem.load_template_source' in settings .TEMPLATE_LOADERS
147147 or 'django.template.loaders.filesystem.Loader' in settings .TEMPLATE_LOADERS ):
148148 dirs .update (map (unicode , settings .TEMPLATE_DIRS ))
149149
@@ -281,12 +281,10 @@ def search_python_list(python_code, template_names):
281281 Returns a list of tuples, each one being:
282282 (filename, line number)
283283 """
284- retval = []
284+ retval = set ()
285285 for tn in template_names :
286- retval .extend (search_python (python_code , tn ))
287- retval = list (set (retval ))
288- retval .sort ()
289- return retval
286+ retval .update (search_python (python_code , tn ))
287+ return sorted (retval )
290288
291289def search_python (python_code , template_name ):
292290 """
You can’t perform that action at this time.
0 commit comments