diff --git a/django/template/__init__.py b/django/template/__init__.py
index 29daa76..3141ce2 100644
--- a/django/template/__init__.py
+++ b/django/template/__init__.py
@@ -59,6 +59,7 @@ from django.utils.encoding import smart_unicode, force_unicode
 from django.utils.translation import ugettext as _
 from django.utils.safestring import SafeData, EscapeData, mark_safe, mark_for_escaping
 from django.utils.html import escape
+from django.templatetags import get_templatetags_modules
 
 __all__ = ('Template', 'Context', 'RequestContext', 'compile_string')
 
@@ -910,22 +911,37 @@ class Library(object):
             return func
         return dec
 
-def get_library(module_name):
-    lib = libraries.get(module_name, None)
+def get_library(library_name, extra_modules=[]):
+    lib = libraries.get(library_name, None)
     if not lib:
-        try:
-            mod = __import__(module_name, {}, {}, [''])
-        except ImportError, e:
-            raise InvalidTemplateLibrary("Could not load template library from %s, %s" % (module_name, e))
-        try:
-            lib = mod.register
-            libraries[module_name] = lib
-        except AttributeError:
-            raise InvalidTemplateLibrary("Template library %s does not have a variable named 'register'" % module_name)
+        templatetags_modules = get_templatetags_modules()
+        search_modules = extra_modules + templatetags_modules
+        for m in search_modules: 
+            app_label = m.split('.')[-1]
+            "Allow both library_name and app_label.library_name"
+            try:
+                app, library = library_name.split('.')
+            except:
+                app, library = ('', library_name)
+            if not app or app == app_label:
+                try:
+                    module_name = '%s.%s' % (m, library)
+                    mod = __import__(module_name, {}, {}, [''])
+                except ImportError:
+                    continue
+            else:
+                continue
+            try:
+                lib = mod.register
+                libraries[library_name] = lib
+            except AttributeError:
+                raise InvalidTemplateLibrary("Template library %s does not have a variable named 'register'" % module_name)
+        if not lib:
+            raise InvalidTemplateLibrary("Template library %s not found, tried %s" % (library_name, str(search_modules))) 
     return lib
 
-def add_to_builtins(module_name):
-    builtins.append(get_library(module_name))
+def add_to_builtins(module_name, library_name):
+    builtins.append(get_library(library_name, extra_modules=[module_name]))
 
-add_to_builtins('django.template.defaulttags')
-add_to_builtins('django.template.defaultfilters')
+add_to_builtins('django.template', 'defaulttags')
+add_to_builtins('django.template', 'defaultfilters')
diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py
index e5a8e66..cd671b9 100644
--- a/django/template/defaulttags.py
+++ b/django/template/defaulttags.py
@@ -850,7 +850,7 @@ def load(parser, token):
     for taglib in bits[1:]:
         # add the library to the parser
         try:
-            lib = get_library("django.templatetags.%s" % taglib)
+            lib = get_library(taglib)
             parser.add_library(lib)
         except InvalidTemplateLibrary, e:
             raise TemplateSyntaxError("'%s' is not a valid tag library: %s" %
diff --git a/django/template/loader.py b/django/template/loader.py
index 03e6f8d..9cb893c 100644
--- a/django/template/loader.py
+++ b/django/template/loader.py
@@ -115,4 +115,4 @@ def select_template(template_name_list):
     # If we get here, none of the templates could be loaded
     raise TemplateDoesNotExist, ', '.join(template_name_list)
 
-add_to_builtins('django.template.loader_tags')
+add_to_builtins('django.template', 'loader_tags')
diff --git a/django/templatetags/__init__.py b/django/templatetags/__init__.py
index 9204535..6e4db0e 100644
--- a/django/templatetags/__init__.py
+++ b/django/templatetags/__init__.py
@@ -1,7 +1,15 @@
 from django.conf import settings
+import os
 
-for a in settings.INSTALLED_APPS:
-    try:
-        __path__.extend(__import__(a + '.templatetags', {}, {}, ['']).__path__)
-    except ImportError:
-        pass
+templatetags_modules = [] 
+
+def get_templatetags_modules():
+    if not templatetags_modules:
+        for a in ['django'] + list(settings.INSTALLED_APPS):
+            try:
+                name = a + '.templatetags'
+                mod = __import__(name, {}, {}, [''])
+                templatetags_modules.append(name)
+            except ImportError:
+                pass
+    return templatetags_modules 
diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py
index aef6f50..0490f2a 100644
--- a/tests/regressiontests/templates/tests.py
+++ b/tests/regressiontests/templates/tests.py
@@ -45,7 +45,7 @@ def do_echo(parser, token):
 
 register.tag("echo", do_echo)
 
-template.libraries['django.templatetags.testtags'] = register
+template.libraries['testtags'] = register
 
 #####################################
 # Helper objects for template tests #
