Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from django.db.models.functions import Cast
- from django.db.models import TextField
- models_with_json_text = Model.objects.annotate(
- json_as_text=Cast("json_field_name", TextField())
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement