Ticket #6034: syncdb_no_fixture.diff

File syncdb_no_fixture.diff, 1.3 KB (added by delimy@…, 17 years ago)
  • local/django/django/core/management/commands/syncdb.py

     
    1616        make_option('--noinput', action='store_false', dest='interactive', default=True,
    1717            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.'),
    1820    )
    1921    help = "Create the database tables for all apps in INSTALLED_APPS whose tables haven't already been created."
     
    2628        verbosity = int(options.get('verbosity', 1))
    2729        interactive = options.get('interactive')
     30        load_fixtures = options.get('load_fixtures')
    2831
    2932        self.style = no_style()
     
    135138        # Install the 'initial_data' fixture, using format discovery
    136139        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)
Back to Top