Closed fockez closed 2 years ago
I'm sorry, I'm not very familiar with this .. isn't it possible to associate the Model class itself to a specifica database ? Either for reading, writing or both ? Should this be possible, you would just associate the Model to a specifica AjxDatatableView as usual.
Or, I would try to solve overridding get_initial_queryset
Let me know if this help ;)
OK, i see. I will use database router to deal with this. At first, I thought there may be a class attribution to define a non default database.
ok then
I have defined several databases in settings.py. Commonly, I use "using('xxx')" to query specific database. But how should I set this in django-ajax-datatable easily?