def load_fixture(apps, schema_editor): Country = apps.get_model('geography', 'Country') Region = apps.get_model('geography', 'Region') Country.objects.all().delete() Region.objects.all().delete() fixture_filename = 'initial_0003.json' fixture_path = os.path.join(fixture_dir, fixture_filename) safe_load_fixture(apps, fixture_path)
def unload_fixture(apps, schema_editor): call_command('flush', interactive=False) fixture_filename = 'initial_0001.json' fixture_path = os.path.join(fixture_dir, fixture_filename) safe_load_fixture(apps, fixture_path)
def load_fixture(apps, schema_editor): fixture_filename = 'initial_0002.json' fixture_path = os.path.join(fixture_dir, fixture_filename) safe_load_fixture(apps, fixture_path)