python


How to use multidatabase across multiproject in django?


I have several django projects to serve different services which have connection to each other (ignore the reason why). To isolate each service, I provide a lib to do the dirty job. The problem is that I can import models from different projects but django maps every model to the database of the running project NOT the project which the model belongs to.
Tried many options but just can't fix it. Again, services should be isolated in each project and can communicate to each other only by lib.
You should setup all the connections needed in your settings and use database routers for routing the request to the correct database connection, depending on the model.

Related Links

Convert pandas dataframe of lists to dict of dataframes
How do i create a “list” of groups read from an hdf5 files
Converting Nested Json into Python object
pytest: Is test performance faster for tests in many small modules or wrapped under classes in a few large modules?
How to get more then 100,000 results in respond using Google BigQuery python API?
grequests - first couple of responses 200 then 403
Defining a semantic orientation for a small dataset
Python replace a line only if it meets a condition [duplicate]
Retrieving Excel cell names with XLRD [duplicate]
Install pyinstaller with no internet access
Confused about type hints in Python3
Append() applied to a list goes into loop
MultiIndex from Pivot Tuple Index
Multiclient server in Python - how to broadcast?
PyCharm doesn't appear to run all unit tests
Solve system of linear integer equations in Python

Categories

HOME
sass
codeeffects
websphere-liberty
i2c
constructor
oclint
android-source
aspell
flat-file
raphael
epicor
tarantool
multiplayer
fabric
jflex
visual-c++-2017
kong
solidworks
forum
pari
spring-profiles
construct-2
shapes
fabric-digits
passenger
.net-assembly
parse-android-sdk
soundjs
g1gc
ivona
walmart-electrode
chunked-encoding
windows-firewall
pinvoke
paas
teiid
easing
dts
scalar
metalsmith
spatial-query
asynccallback
aerogear
interactive-brokers
asp.net-mvc-2
void
jenkins-scriptler
uialertview
criteria-api
custom-url
cpan
django-1.6
activity-streams
and-operator
author
alpha-transparency
smartystreets
alertifyjs
dvcs
chrome-for-android
sanitization
convex-polygon
osx-snow-leopard
haskell-platform
justgage
google-closure-library
client-side-scripting
qt4.6
vt100
transitive-closure-table
tridion2009
blockingqueue
icefaces-3
law-of-demeter
curljs
easygui
goliath
ihttphandler
adobe-contribute
drawtext
querypath
kpi
inline-if
project-lifecycle

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App