using(alias)
This method is for controlling which database the QuerySet
will be evaluated against if you are using more than one database. The only argument this method takes is the alias of a database, as defined in DATABASES
.
For example:
# queries the database with the 'default' alias. >>> Entry.objects.all() # queries the database with the 'backup' alias >>> Entry.objects.using('backup')
Please login to continue.