MCPcopy
hub / github.com/django/django / model_installed

Method model_installed

django/core/management/commands/migrate.py:448–458  ·  view source on GitHub ↗
(model)

Source from the content-addressed store, hash-verified

446 ]
447
448 def model_installed(model):
449 opts = model._meta
450 converter = connection.introspection.identifier_converter
451 max_name_length = connection.ops.max_name_length()
452 return not (
453 (converter(truncate_name(opts.db_table, max_name_length)) in tables)
454 or (
455 opts.auto_created
456 and converter(opts.auto_created._meta.db_table) in tables
457 )
458 )
459
460 manifest = {
461 app_name: list(filter(model_installed, model_list))

Callers

nothing calls this directly

Calls 2

truncate_nameFunction · 0.90
max_name_lengthMethod · 0.45

Tested by

no test coverage detected