Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 20486

How to query a JSONField comprising a list of values in DJANGO

$
0
0

I am using JSONField to store the configuration parameter(user_types) as a list as follows:

["user_type1", "user_type2", "user_type3"]

How to query to filter elements of type "user_type1"? The following query is not working:

rows=ConfigUserTable.objects.filter(user_types__in=["user_type1"])

Thanks


Viewing all articles
Browse latest Browse all 20486

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>