Refs #5690 -- Changed path joining to use `os.pardir` instead of `'..'`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6456 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
d79f684f9d
commit
d2952d47ce
|
@ -239,7 +239,7 @@ def setup_environ(settings_mod):
|
|||
project_directory, settings_filename = os.path.split(settings_mod.__file__)
|
||||
project_name = os.path.basename(project_directory)
|
||||
settings_name = os.path.splitext(settings_filename)[0]
|
||||
sys.path.append(os.path.join(project_directory, '..'))
|
||||
sys.path.append(os.path.join(project_directory, os.pardir))
|
||||
project_module = __import__(project_name, {}, {}, [''])
|
||||
sys.path.pop()
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ class Command(LabelCommand):
|
|||
directory = os.getcwd()
|
||||
# Determine the project_name a bit naively -- by looking at the name of
|
||||
# the parent directory.
|
||||
project_dir = os.path.normpath(os.path.join(directory, '..'))
|
||||
project_dir = os.path.normpath(os.path.join(directory, os.pardir))
|
||||
parent_dir = os.path.basename(project_dir)
|
||||
project_name = os.path.basename(directory)
|
||||
if app_name == project_name:
|
||||
|
|
Loading…
Reference in New Issue