24 ms·
Django's version of that query (to me) looks a little neater too. records = Resource.objects.filter( data__lastname__exact="Doe"
by kennydude 8y ago
Django's version of that query (to me) looks a little neater too.
records = Resource.objects.filter(
data__lastname__exact="Doe"
)
- oneweekwonder 8y agoOne can also write the sqla query as: Resource.query.filter( Resources.data["lastname"].astext=="Doe" ) Personally I find the "__" convension strange and not sure that it would be obvious to new comers that you are accessing a key in the data column.