1 from dmigrations
.migration_db
import MigrationDb
2 from django
.conf
import settings
4 def save_migration(output
, migration_output
, app_name
):
6 If output flag is set, print migration out.
10 print migration_output
12 file_path
= MigrationDb(
13 directory
= settings
.DMIGRATIONS_DIR
14 ).migration_path(app_name
)
15 open(file_path
, 'w').write(migration_output
)
16 print "Created migration: %s" % file_path