Got the error QuerySet does not have raw when trying to do
MyModel.objects.using(‘slave’).raw(‘select …’)
The problem is you have to set the DB onto the db model like this:
MyModel.objects.db_manager(‘slave’).raw(‘…’)
Got the error QuerySet does not have raw when trying to do
MyModel.objects.using(‘slave’).raw(‘select …’)
The problem is you have to set the DB onto the db model like this:
MyModel.objects.db_manager(‘slave’).raw(‘…’)