Django

Code

Changeset 4989

Show
Ignore:
Timestamp:
04/09/07 15:57:07 (2 years ago)
Author:
adrian
Message:

Fixed #3846 -- Fixed misleading variable name in 'startapp' code. Thanks, MarioGonzalez

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/management.py

    r4937 r4989  
    790790    # the parent directory. 
    791791    project_dir = os.path.normpath(os.path.join(directory, '..')) 
    792     project_name = os.path.basename(project_dir) 
    793     if app_name == os.path.basename(directory): 
     792    parent_dir = os.path.basename(project_dir) 
     793    project_name = os.path.basename(directory) 
     794    if app_name == project_name: 
    794795        sys.stderr.write(style.ERROR("Error: You cannot create an app with the same name (%r) as your project.\n" % app_name)) 
    795796        sys.exit(1) 
    796     _start_helper('app', app_name, directory, project_name
     797    _start_helper('app', app_name, directory, parent_dir
    797798startapp.help_doc = "Creates a Django app directory structure for the given app name in the current directory." 
    798799startapp.args = "[appname]"