1👍
✅
Use the startswith
lookup:
list(product_details.objects.filter(p_id__startswith=pid + '_').values())
Source:stackexchange.com