diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-06-06 13:53:12 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-06-06 13:54:40 +0200 |
| commit | f0664dc8ae541b21e3cf421725e7933a9b3a799e (patch) | |
| tree | f5ff1a802a35fde45fcef5cc310d10ebcdaa8fd0 /django | |
| parent | 7edf231d4666604a455621c4800c6b031a2f0b5b (diff) | |
Made TestNoInitialDataLoading pass with MySQL (Refs #15926)
Diffstat (limited to 'django')
| -rw-r--r-- | django/core/management/commands/flush.py | 5 | ||||
| -rw-r--r-- | django/core/management/commands/syncdb.py | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/django/core/management/commands/flush.py b/django/core/management/commands/flush.py index 7eb71fd1bb..2fc2e7ed26 100644 --- a/django/core/management/commands/flush.py +++ b/django/core/management/commands/flush.py @@ -81,9 +81,8 @@ The full error: %s""" % (connection.settings_dict['NAME'], e)) # Reinstall the initial_data fixture. kwargs = options.copy() kwargs['database'] = db - if options.get('load_initial_data', True): - # Reinstall the initial_data fixture. - from django.core.management import call_command + if options.get('load_initial_data'): + # Reinstall the initial_data fixture. call_command('loaddata', 'initial_data', **options) else: diff --git a/django/core/management/commands/syncdb.py b/django/core/management/commands/syncdb.py index f751a3768b..cf26e754ae 100644 --- a/django/core/management/commands/syncdb.py +++ b/django/core/management/commands/syncdb.py @@ -2,6 +2,7 @@ from optparse import make_option import traceback from django.conf import settings +from django.core.management import call_command from django.core.management.base import NoArgsCommand from django.core.management.color import no_style from django.core.management.sql import custom_sql_for_model, emit_post_sync_signal @@ -27,7 +28,7 @@ class Command(NoArgsCommand): verbosity = int(options.get('verbosity')) interactive = options.get('interactive') show_traceback = options.get('traceback') - load_initial_data = options.get('load_initial_data', True) + load_initial_data = options.get('load_initial_data') self.style = no_style() @@ -158,6 +159,5 @@ class Command(NoArgsCommand): # Load initial_data fixtures (unless that has been disabled) if load_initial_data: - from django.core.management import call_command call_command('loaddata', 'initial_data', verbosity=verbosity, database=db, skip_validation=True) |
