From d2952d47cea1b56949af2c89005b88613c48c625 Mon Sep 17 00:00:00 2001 From: Gary Wilson Jr Date: Sat, 6 Oct 2007 02:23:59 +0000 Subject: [PATCH] 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 --- django/core/management/__init__.py | 2 +- django/core/management/commands/startapp.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/django/core/management/__init__.py b/django/core/management/__init__.py index e15dfccdf2..cd90fd6109 100644 --- a/django/core/management/__init__.py +++ b/django/core/management/__init__.py @@ -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() diff --git a/django/core/management/commands/startapp.py b/django/core/management/commands/startapp.py index 1da2776cf5..c238e74a08 100644 --- a/django/core/management/commands/startapp.py +++ b/django/core/management/commands/startapp.py @@ -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: