Thanks for the responses. Now I'll try to explain ahead:
If both apps are running on the same host (or more concisely, both apps can
> access the database for app1), why not just add a database router to app2
> and have it pull the information directly?
> https://docs.djangoproject.com/en/1.8/to
Ah yes, my answer only applies if you have two separate instances of Django
running with separate databases. That was my assumption since the full
database is available to all apps within a single Django instance as
Stephen mentioned.
-James
On Aug 16, 2015 3:55 AM, "Stephen J. Butler"
wrote:
>
These are all in the same project, right? In your app2 just do:
from app1.models import MyUserModel
Or maybe factor out the logic of app1/resources/user to a function and do
from app2:
from app1.utils import get_user_logic
There's no special communication between Django apps required. All the c
If both apps are running on the same host (or more concisely, both apps can
access the database for app1), why not just add a database router to app2
and have it pull the information directly?
https://docs.djangoproject.com/en/1.8/topics/db/multi-db/
Another option would be to have logic in app2
I had searched in the web about local communication between apps, but I
didn't find anything (or, at least, didn't catch it) about calling an app
from another. Let's say I've this:
http://localhost:8000/app1/resources/user?id=123
http://localhost:8000/app2/list_users
Each app (by the way, first
5 matches
Mail list logo