order_by function gets error if the field name or json key, has a dash.
I know Django use a dash for asc or desc methods. but in this case the dash
is in the middle.
EXAMPLE:
MyTable.objects.all().order_by('myfield__en-us')
I have a jsonb field like:
{
"es": "Casa",
"en-us": "House"
}
Does anybody know how to fix it?
I can't change de json structure :(
Thanks.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/9cd9ae56-5529-4915-b91a-5703926e58de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.