MCPcopy
hub / github.com/django/django / emit_pre_migrate_signal

Function emit_pre_migrate_signal

django/core/management/sql.py:22–39  ·  view source on GitHub ↗
(verbosity, interactive, db, **kwargs)

Source from the content-addressed store, hash-verified

20
21
22def emit_pre_migrate_signal(verbosity, interactive, db, **kwargs):
23 # Emit the pre_migrate signal for every application.
24 for app_config in apps.get_app_configs():
25 if app_config.models_module is None:
26 continue
27 if verbosity >= 2:
28 stdout = kwargs.get("stdout", sys.stdout)
29 stdout.write(
30 "Running pre-migrate handlers for application %s" % app_config.label
31 )
32 models.signals.pre_migrate.send(
33 sender=app_config,
34 app_config=app_config,
35 verbosity=verbosity,
36 interactive=interactive,
37 using=db,
38 **kwargs,
39 )
40
41
42def emit_post_migrate_signal(verbosity, interactive, db, **kwargs):

Callers 1

handleMethod · 0.90

Calls 4

get_app_configsMethod · 0.80
getMethod · 0.45
writeMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected