Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit d2952d47cea1b56949af2c89005b88613c48c625 1 parent d79f684
Gary Wilson Jr. gdub authored
2  django/core/management/__init__.py
View
@@ -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()
2  django/core/management/commands/startapp.py
View
@@ -16,7 +16,7 @@ def handle_label(self, app_name, directory=None, **options):
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:
Please sign in to comment.
Something went wrong with that request. Please try again.