django check if model has items in db code example Example: check django object exists modelName.objects.filter(pk='id').exists()