Ticket #6034: syncdb_no_fixture.diff
File syncdb_no_fixture.diff, 1.3 KB (added by , 17 years ago) |
---|
-
local/django/django/core/management/commands/syncdb.py
16 16 make_option('--noinput', action='store_false', dest='interactive', default=True, 17 17 help='Tells Django to NOT prompt the user for input of any kind.'), 18 make_option('--load_fixtures', action='store', dest='load_fixtures', default=True, 19 help='Tells Django to load data fixtures, default is True.'), 18 20 ) 19 21 help = "Create the database tables for all apps in INSTALLED_APPS whose tables haven't already been created." … … 26 28 verbosity = int(options.get('verbosity', 1)) 27 29 interactive = options.get('interactive') 30 load_fixtures = options.get('load_fixtures') 28 31 29 32 self.style = no_style() … … 135 138 # Install the 'initial_data' fixture, using format discovery 136 139 from django.core.management import call_command 137 call_command('loaddata', 'initial_data', verbosity=verbosity) 140 if load_fixtures: 141 call_command('loaddata', 'initial_data', verbosity=verbosity)