Fixed #83 -- Fixed spelling error in django.conf.settings. Nice catch, Manuzhai!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@203 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
bec9009d83
commit
7fa76265ad
|
@ -2,7 +2,7 @@
|
||||||
Settings and configuration for Django.
|
Settings and configuration for Django.
|
||||||
|
|
||||||
Values will be read from the module specified by the DJANGO_SETTINGS_MODULE environment
|
Values will be read from the module specified by the DJANGO_SETTINGS_MODULE environment
|
||||||
variable, and then from django.conf.global_settings; see the global settings file for
|
variable, and then from django.conf.global_settings; see the global settings file for
|
||||||
a list of all possible variables.
|
a list of all possible variables.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ import os
|
||||||
import sys
|
import sys
|
||||||
from django.conf import global_settings
|
from django.conf import global_settings
|
||||||
|
|
||||||
# get a reference to this module (why isn't there a __module__ magic var?)
|
# get a reference to this module (why isn't there a __module__ magic var?)
|
||||||
me = sys.modules[__name__]
|
me = sys.modules[__name__]
|
||||||
|
|
||||||
# update this dict from global settings (but only for ALL_CAPS settings)
|
# update this dict from global settings (but only for ALL_CAPS settings)
|
||||||
|
@ -22,7 +22,7 @@ for setting in dir(global_settings):
|
||||||
try:
|
try:
|
||||||
me.SETTINGS_MODULE = os.environ["DJANGO_SETTINGS_MODULE"]
|
me.SETTINGS_MODULE = os.environ["DJANGO_SETTINGS_MODULE"]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
raise EnvironmentError, "Environemnt variable DJANGO_SETTINGS_MODULE is undefined."
|
raise EnvironmentError, "Environment variable DJANGO_SETTINGS_MODULE is undefined."
|
||||||
|
|
||||||
try:
|
try:
|
||||||
mod = __import__(me.SETTINGS_MODULE, '', '', [''])
|
mod = __import__(me.SETTINGS_MODULE, '', '', [''])
|
||||||
|
@ -35,7 +35,7 @@ for setting in dir(mod):
|
||||||
|
|
||||||
# save DJANGO_SETTINGS_MODULE in case anyone in the future cares
|
# save DJANGO_SETTINGS_MODULE in case anyone in the future cares
|
||||||
me.SETTINGS_MODULE = os.environ.get('DJANGO_SETTINGS_MODULE', '')
|
me.SETTINGS_MODULE = os.environ.get('DJANGO_SETTINGS_MODULE', '')
|
||||||
|
|
||||||
# move the time zone info into os.environ
|
# move the time zone info into os.environ
|
||||||
os.environ['TZ'] = me.TIME_ZONE
|
os.environ['TZ'] = me.TIME_ZONE
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue