Ticket #3475: invalid_app_names.2.patch
File invalid_app_names.2.patch, 1018 bytes (added by , 18 years ago) |
---|
-
django/core/management.py
27 27 28 28 INVALID_PROJECT_NAMES = ('django', 'site', 'test') 29 29 30 INVALID_APPLICATION_NAMES = INVALID_PROJECT_NAMES 31 30 32 # Set up the terminal color scheme. 31 33 class dummy: pass 32 34 style = dummy() … … 726 728 "Creates a Django app for the given app_name in the given directory." 727 729 # Determine the project_name a bit naively -- by looking at the name of 728 730 # the parent directory. 731 if app_name in INVALID_APPLICATION_NAMES: 732 sys.stderr.write(style.ERROR("Error: '%r' conflicts with the name of an existing Python module and cannot be used as a application name. Please try another name.\n" % app_name)) 733 sys.exit(1) 729 734 project_dir = os.path.normpath(os.path.join(directory, '..')) 730 735 project_name = os.path.basename(project_dir) 731 736 if app_name == os.path.basename(directory):