1020 | | for module in templatetags_modules: |
1021 | | taglib_module = '%s.%s' % (module, library_name) |
1022 | | tried_modules.append(taglib_module) |
1023 | | lib = import_library(taglib_module) |
1024 | | if lib: |
1025 | | libraries[library_name] = lib |
1026 | | break |
| 1019 | # first try the fully qualified module path |
| 1020 | taglib_module = library_name |
| 1021 | tried_modules.append(taglib_module) |
| 1022 | lib = import_library(taglib_module) |
| 1023 | if lib: |
| 1024 | libraries[library_name] = lib |
| 1025 | else: # then search inside installed apps |
| 1026 | templatetags_modules = get_templatetags_modules() |
| 1027 | for module in templatetags_modules: |
| 1028 | taglib_module = '%s.%s' % (module, library_name) |
| 1029 | tried_modules.append(taglib_module) |
| 1030 | lib = import_library(taglib_module) |
| 1031 | if lib: |
| 1032 | libraries[library_name] = lib |
| 1033 | break |