Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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. authored October 06, 2007
2  django/core/management/__init__.py
@@ -239,7 +239,7 @@ def setup_environ(settings_mod):
239 239
     project_directory, settings_filename = os.path.split(settings_mod.__file__)
240 240
     project_name = os.path.basename(project_directory)
241 241
     settings_name = os.path.splitext(settings_filename)[0]
242  
-    sys.path.append(os.path.join(project_directory, '..'))
  242
+    sys.path.append(os.path.join(project_directory, os.pardir))
243 243
     project_module = __import__(project_name, {}, {}, [''])
244 244
     sys.path.pop()
245 245
 
2  django/core/management/commands/startapp.py
@@ -16,7 +16,7 @@ def handle_label(self, app_name, directory=None, **options):
16 16
             directory = os.getcwd()
17 17
         # Determine the project_name a bit naively -- by looking at the name of
18 18
         # the parent directory.
19  
-        project_dir = os.path.normpath(os.path.join(directory, '..'))
  19
+        project_dir = os.path.normpath(os.path.join(directory, os.pardir))
20 20
         parent_dir = os.path.basename(project_dir)
21 21
         project_name = os.path.basename(directory)
22 22
         if app_name == project_name:

0 notes on commit d2952d4

Please sign in to comment.
Something went wrong with that request. Please try again.