Re: About local apps communication

2015-08-16 Thread durirompepc
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

Re: About local apps communication

2015-08-16 Thread James Schneider
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: >

Re: About local apps communication

2015-08-16 Thread Stephen J. Butler
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

Re: About local apps communication

2015-08-16 Thread James Schneider
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

About local apps communication

2015-08-16 Thread durirompepc
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