SHARE
TWEET

Untitled

a guest Aug 19th, 2019 72 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top