Forced marriage of two Django projects #124
-
Say, I have a Django project A that does not currently use idom. I'd like to integrate Django project B, built with idom, into A, while minimizing the contact area. I can think of several options, such as via API or INSTALLED_APPS. But suppose A and B are running in parallel Docker containers, suitably connected; and B only requires some credentials from A to run. Could I conjure up idom components from B in A in a light-weight way? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
IDOM currently does not provide any built-in methods of sharing generic data between separate Django projects. In terms of sharing generic data, the current method would likely involve API calls and then In terms of sharing pre-written components from one Django project to the other, that's a bit rough. Especially given they're in separate docker containers. Sharing Python modules between two dockers is a general technological challenge. You should consider The same technological challenge would exist with trying to reuse a Django In terms of future (undeveloped) options, the following might be related? If both projects are connected to the same database, then see If both projects can be connected to the same Django channels layer, then see These options could potentially be used in conjunction with dill to transmit components to a new host project. But that still wouldn't get things importable within your template. |
Beta Was this translation helpful? Give feedback.
IDOM currently does not provide any built-in methods of sharing generic data between separate Django projects.
In terms of sharing generic data, the current method would likely involve API calls and then
use_query
database fetching in your components.In terms of sharing pre-written components from one Django project to the other, that's a bit rough. Especially given they're in separate docker containers. Sharing Python modules between two dockers is a general technological challenge.
You should consider
docker export
ing a common directory which contain the component files. Then, you can either useimportlib
to ensure the Python interpreter is aware of these new dotted paths, or contain …