Guest User

Untitled

a guest
Aug 19th, 2019
76
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from django.db.models.functions import Cast
  2. from django.db.models import TextField
  3.  
  4. models_with_json_text = Model.objects.annotate(
  5. json_as_text=Cast("json_field_name", TextField())
  6. )
RAW Paste Data