I have a simple model define in Django. I want to select an Object using django select_for_update method to ensure data persistence as multiple threads needs to update single row but different columns. But it is giving following error:
Obj = my_model.objects.select_for_update().filter(pk=1)
AttributeError: 'Manager' object has no attribute 'select_for_update'
Please help me in solving this issue. Thanks
check it out the documentation :
https://docs.djangoproject.com/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.select_for_update
so if you`ll have to upgrade your django version to the development version!