Add bootstrap model dependecies support

This commit is contained in:
Roberto Rosario
2012-10-08 18:50:07 -04:00
parent 82299a49c4
commit efc41ad9c7
8 changed files with 89 additions and 7 deletions

View File

@@ -24,7 +24,7 @@ class BootstrapSetupManager(models.Manager):
Get the current setup of Mayan in bootstrap format fixture
"""
result = []
for bootstrap_model in BootstrapModel.get_all():
for bootstrap_model in BootstrapModel.get_all(sort_by_dependencies=True):
model_fixture = bootstrap_model.dump(serialization_format)
# Only add non empty model fixtures
if not FIXTURE_TYPE_EMPTY_FIXTURE[serialization_format](model_fixture):