Function
emit_post_migrate_signal
(verbosity, interactive, db, **kwargs)
Source from the content-addressed store, hash-verified
| 40 | |
| 41 | |
| 42 | def emit_post_migrate_signal(verbosity, interactive, db, **kwargs): |
| 43 | # Emit the post_migrate signal for every application. |
| 44 | for app_config in apps.get_app_configs(): |
| 45 | if app_config.models_module is None: |
| 46 | continue |
| 47 | if verbosity >= 2: |
| 48 | stdout = kwargs.get("stdout", sys.stdout) |
| 49 | stdout.write( |
| 50 | "Running post-migrate handlers for application %s" % app_config.label |
| 51 | ) |
| 52 | models.signals.post_migrate.send( |
| 53 | sender=app_config, |
| 54 | app_config=app_config, |
| 55 | verbosity=verbosity, |
| 56 | interactive=interactive, |
| 57 | using=db, |
| 58 | **kwargs, |
| 59 | ) |