Ticket #5690: use_dirname_not_dot_dot.diff
File use_dirname_not_dot_dot.diff, 1.3 KB (added by , 17 years ago) |
---|
-
django/core/management/commands/startapp.py
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.dirname(directory)) 20 20 parent_dir = os.path.basename(project_dir) 21 21 project_name = os.path.basename(directory) 22 22 if app_name == project_name: -
django/core/management/__init__.py
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.dirname(project_directory)) 243 243 project_module = __import__(project_name, {}, {}, ['']) 244 244 sys.path.pop() 245 245