[Answered ]-Django get queryset fail on unmanaged database

1👍

You should put .using() first, since .get() resolves eagerly, and then it is thus "too late", so:

Languages.objects.using('ro_bdd').get(idlanguage=1)

A model object also has no .using(), so it would eventually result in a type error if the .get() was successful.

Leave a comment