MCPcopy
hub / github.com/django/django / GeneratedFieldKTModel

Class GeneratedFieldKTModel

tests/schema/tests.py:940–949  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

938 @skipUnlessDBFeature("supports_json_field", "supports_stored_generated_columns")
939 def test_add_generated_field_with_kt_model(self):
940 class GeneratedFieldKTModel(Model):
941 data = JSONField()
942 status = GeneratedField(
943 expression=KT("data__status"),
944 output_field=TextField(),
945 db_persist=True,
946 )
947
948 class Meta:
949 app_label = "schema"
950
951 with CaptureQueriesContext(connection) as ctx:
952 with connection.schema_editor() as editor:

Callers

nothing calls this directly

Calls 3

JSONFieldClass · 0.90
GeneratedFieldClass · 0.90
TextFieldClass · 0.90

Tested by

no test coverage detected