You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello Jeremy,
we are using QDjango in our project for some time now and it worked well.
But now we added another database which stores a different type of data.
The problem now is that, as far as I can see, there is only a globally registered database connection.
We now have to change this connection in each method that does something with the database.
Is there a possibility to bind a connection to certain classes?
For example registering a property for the connection in the class that inherits the QDjangoModel class.
Best Regards,
Daniel
The text was updated successfully, but these errors were encountered:
I added code to QDjango for testing that enables connecting a QDatabase object with a certain QDjangoModel when calling QDjango::registerModel(QDatabase)
When looking at the way Django does it, it seems a Router object would be registered with the model instead of directly giving the database.
Then QDjango could keep a map that keeps the Model->Router connection.
Hello Jeremy,
we are using QDjango in our project for some time now and it worked well.
But now we added another database which stores a different type of data.
The problem now is that, as far as I can see, there is only a globally registered database connection.
We now have to change this connection in each method that does something with the database.
Is there a possibility to bind a connection to certain classes?
For example registering a property for the connection in the class that inherits the QDjangoModel class.
Best Regards,
Daniel
The text was updated successfully, but these errors were encountered: