I have a tool that I use at work, written in python, which I want to port to the Django environment to make it easier to create a web-based management interface. I went through django tutorials and understand well how to write a basic django application with your own database (or databases).
The dilemma that I came across with this particular project is that I refer to several data sources that:
- It may or may not actually be SQL databases, and some of them are not implemented as back-end django (for example, LDAP and Google Admin SDK).
- They are third-party data sources for which the general "model" may change without warning, I can not control it ... Although the parts of their "model" that I will refer to are most likely not to change.
So my question is: should I even think of these external data sources as a django model? Or should I just write separate interface classes to work with these data sources?
I see the possibility of writing in the new "db engine" to handle communication with these data sources, so from the actual implementation of the application I can call all the usual methods, for example, I query any database. Ideally, the kernel of the application that I write does not care about the details of the implementation of each data source to which it connects - I want to make it as possible as possible so that the implementation of new types of data sources in the future does not involve a lot if any modification of the main code.
I want to know if this is the “accepted” way to do it, though, or if in such special situations you could work using django-back-end and just implement your own solution to request information from these data sources.
, . , - , . !