Ticket #3846: management.diff
File management.diff, 1.0 KB (added by , 18 years ago) |
---|
-
django/core/management.py
809 809 # Determine the project_name a bit naively -- by looking at the name of 810 810 # the parent directory. 811 811 project_dir = os.path.normpath(os.path.join(directory, '..')) 812 project_name = os.path.basename(project_dir) 813 if app_name == os.path.basename(directory): 812 parent_dir = os.path.basename(project_dir) 813 project_name = os.path.basename(directory) 814 if app_name == project_name: 814 815 sys.stderr.write(style.ERROR("Error: You cannot create an app with the same name (%r) as your project.\n" % app_name)) 815 816 sys.exit(1) 816 _start_helper('app', app_name, directory, p roject_name)817 _start_helper('app', app_name, directory, parent_dir) 817 818 startapp.help_doc = "Creates a Django app directory structure for the given app name in the current directory." 818 819 startapp.args = "[appname]" 819 820