diff --git a/django/conf/__init__.py b/django/conf/__init__.py
index bda0ef3..f6ae4e0 100644
--- a/django/conf/__init__.py
+++ b/django/conf/__init__.py
@@ -16,18 +16,48 @@ from django.utils import importlib
 
 ENVIRONMENT_VARIABLE = "DJANGO_SETTINGS_MODULE"
 
-class LazySettings(LazyObject):
-    """
-    A lazy proxy for either global Django settings or a custom settings object.
-    The user can manually configure settings prior to using them. Otherwise,
-    Django uses the settings module pointed to by DJANGO_SETTINGS_MODULE.
-    """
+
+class LazySettings(object):
+    def __init__(self):
+        self._is_configured = False
+        # Uqly hack to make the test pass. Should patch
+        # the tests instead. (Backwards compatibility
+        # should not be a problem here).
+        self._wrapped = self
+        self._has_real_wrapped = False
+    
+    def __getattr__(self, name):
+        if not self._is_configured:
+            self._setup()
+            self._is_configured = True
+            if name in self.__dict__:
+                return self.__dict__[name]
+            else:
+                raise AttributeError
+        else:
+            if self._has_real_wrapped:
+                return getattr(self._wrapped, name)
+            raise AttributeError
+     
+    def __delattr__(self, name): 
+         if name == "_wrapped": 
+             raise TypeError("can't delete _wrapped.") 
+         # Need more checks here for _is_configured etc?
+ 	 if not self._is_configured: 
+ 	     self._setup()
+ 	 del self.__dict__[name] 
+    
     def _setup(self):
-        """
-        Load the settings module pointed to by the environment variable. This
-        is used the first time we need any settings at all, if the user has not
-        previously configured the settings manually.
-        """
+        # NOTE: we are working inside __getattr__ here, so be careful to not
+        # refer to any missing value in self.
+
+        # We want to store the actual settings only if the whole _real_init
+        # is succesfull. This way either the settings will be all set up
+        # or none at all, just like with LazySettings. So we store all the
+        # settings in new_dict and copy it to self.__dict__ when
+        # we are done.
+        
+        new_dict = {}
         try:
             settings_module = os.environ[ENVIRONMENT_VARIABLE]
             if not settings_module: # If it's set but is an empty string.
@@ -37,7 +67,60 @@ class LazySettings(LazyObject):
             # problems with Python's interactive help.
             raise ImportError("Settings cannot be imported, because environment variable %s is undefined." % ENVIRONMENT_VARIABLE)
 
-        self._wrapped = Settings(settings_module)
+        # update this dict from global settings (but only for ALL_CAPS settings)
+        for setting in dir(global_settings):
+            if setting == setting.upper():
+                new_dict[setting] = getattr(global_settings, setting)
+
+        # store the settings module in case someone later cares
+        new_dict["SETTINGS_MODULE"] = settings_module
+
+        try:
+            mod = importlib.import_module(settings_module)
+        except ImportError, e:
+            raise ImportError("Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s" % (settings_module, e))
+
+        # Settings that should be converted into tuples if they're mistakenly entered
+        # as strings.
+        tuple_settings = ("INSTALLED_APPS", "TEMPLATE_DIRS")
+
+        for setting in dir(mod):
+            if setting == setting.upper():
+                setting_value = getattr(mod, setting)
+                if setting in tuple_settings and type(setting_value) == str:
+                    setting_value = (setting_value,) # In case the user forgot the comma.
+                new_dict[setting] = setting_value
+
+        # Expand entries in INSTALLED_APPS like "django.contrib.*" to a list
+        # of all those apps.
+        new_installed_apps = []
+        for app in new_dict['INSTALLED_APPS']:
+            if app.endswith('.*'):
+                app_mod = importlib.import_module(app[:-2])
+                appdir = os.path.dirname(app_mod.__file__)
+                app_subdirs = os.listdir(appdir)
+                app_subdirs.sort()
+                name_pattern = re.compile(r'[a-zA-Z]\w*')
+                for d in app_subdirs:
+                    if name_pattern.match(d) and os.path.isdir(os.path.join(appdir, d)):
+                        new_installed_apps.append('%s.%s' % (app[:-2], d))
+            else:
+                new_installed_apps.append(app)
+        new_dict["INSTALLED_APPS"] = new_installed_apps
+
+        if hasattr(time, 'tzset') and new_dict.get('TIME_ZONE'):
+            # When we can, attempt to validate the timezone. If we can't find
+            # this file, no check happens and it's harmless.
+            zoneinfo_root = '/usr/share/zoneinfo'
+            if (os.path.exists(zoneinfo_root) and not
+                    os.path.exists(os.path.join(zoneinfo_root, *(new_dict['TIME_ZONE'].split('/'))))):
+                raise ValueError("Incorrect timezone setting: %s" % new_dict['TIME_ZONE'])
+            # Move the time zone info into os.environ. See ticket #2315 for why
+            # we don't do this unconditionally (breaks Windows).
+            os.environ['TZ'] = new_dict['TIME_ZONE']
+            time.tzset()
+        # Everything passed. Now it is safe to make the settings visible.
+        self.__dict__.update(new_dict)
 
     def configure(self, default_settings=global_settings, **options):
         """
@@ -45,18 +128,19 @@ class LazySettings(LazyObject):
         parameter sets where to retrieve any unspecified values from (its
         argument must support attribute access (__getattr__)).
         """
-        if self._wrapped != None:
+        if self._is_configured:
             raise RuntimeError('Settings already configured.')
         holder = UserSettingsHolder(default_settings)
         for name, value in options.items():
             setattr(holder, name, value)
         self._wrapped = holder
+        self._has_real_wrapped = True
 
     def configured(self):
         """
         Returns True if the settings have already been configured.
         """
-        return bool(self._wrapped)
+        return self._is_configured
     configured = property(configured)
 
 class Settings(object):
