Ticket #8329: startproj.diff
File startproj.diff, 2.0 KB (added by , 16 years ago) |
---|
-
django/core/management/base.py
169 169 def handle_label(self, label, **options): 170 170 raise NotImplementedError() 171 171 172 class InvalidStartProjectContextCommand(BaseCommand): 173 args = '' 174 175 def handle(self, *args, **options): 176 #if args: 177 raise CommandError("The startproject command has been disabled as you have a project defined. Hint unset your DJANGO_SETTINGS_MODULE environment variable") 178 #return self.handle_noargs(**options) 179 180 def handle_noargs(self, **options): 181 raise CommandError("The startproject command has been disabled as you have a project defined. Hint unset your DJANGO_SETTINGS_MODULE environment variable") 182 #raise NotImplementedError() 183 184 172 185 class NoArgsCommand(BaseCommand): 173 186 args = '' 174 187 -
django/core/management/__init__.py
4 4 from imp import find_module 5 5 6 6 import django 7 from django.core.management.base import BaseCommand, CommandError, handle_default_options 7 from django.core.management.base import BaseCommand, CommandError, handle_default_options, InvalidStartProjectContextCommand 8 8 9 9 # For backwards compatibility: get_version() used to be in this module. 10 10 get_version = django.get_version … … 125 125 if project_directory: 126 126 # Remove the "startproject" command from self.commands, because 127 127 # that's a django-admin.py command, not a manage.py command. 128 del _commands['startproject'] 128 #del _commands['startproject'] 129 _commands['startproject'] = InvalidStartProjectContextCommand() 129 130 130 131 # Override the startapp command so that it always uses the 131 132 # project_directory, not the current working directory