Ticket #5690: use_dirname_not_dot_dot.diff

File use_dirname_not_dot_dot.diff, 1.3 KB (added by Thomas Güttler <hv@…>, 17 years ago)
  • django/core/management/commands/startapp.py

     
    1616            directory = os.getcwd()
    1717        # Determine the project_name a bit naively -- by looking at the name of
    1818        # the parent directory.
    19         project_dir = os.path.normpath(os.path.join(directory, '..'))
     19        project_dir = os.path.normpath(os.path.dirname(directory))
    2020        parent_dir = os.path.basename(project_dir)
    2121        project_name = os.path.basename(directory)
    2222        if app_name == project_name:
  • django/core/management/__init__.py

     
    239239    project_directory, settings_filename = os.path.split(settings_mod.__file__)
    240240    project_name = os.path.basename(project_directory)
    241241    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))
    243243    project_module = __import__(project_name, {}, {}, [''])
    244244    sys.path.pop()
    245245
Back to Top