Django multiple application with common users

135 views
Skip to first unread message

Domagoj Kovač

unread,
Mar 16, 2015, 4:23:22 AM3/16/15
to django...@googlegroups.com
Hi everybody,

I have a question. I am working on a series of small home apps for me and my family. 
I have application like:
  • cost management - application where i track all my income and costs
  • market research - application that i use for market researc
  • food management - application where i plan my meals
List will probably continue.

I want to have users shared between this applications, what would be the best approach to this?

I would like to have separate databases for every application including user management.

Best,
Domagoj

Raphael Michel

unread,
Mar 16, 2015, 6:50:02 AM3/16/15
to django...@googlegroups.com
Hi,

Am Mon, 16 Mar 2015 01:23:22 -0700 (PDT)
schrieb Domagoj Kovač <docto...@gmail.com>:
> I would like to have separate databases for every application
> including user management.

I can think of:

(a) You put all the application in the same database and share a user
model (look up 'reusable django apps')

(b) You let all applications have their own database but share one
common user database (look up 'django multiple databases')

(c) You set up the apps completely separated and use an external,
independent authentication provider (look up 'django ldap', 'django
openid', …)

For 'small home apps', I'd absolutely go for (a).

Best regards,
Raphael

Domagoj Kovač

unread,
Mar 16, 2015, 10:47:45 AM3/16/15
to django...@googlegroups.com
Hi Raphael,

I also though this are may options, although first option is the easiest i would like to do something a bit more complex. I would also like to access my applications from different domains and this means options a and b cant satisfied my needs. If i use multiple databases this only means i will separate my applications on database level but not on the application level. I want them to be separate completely.

I am thinking the best solution for now would be to use a combination of multiple databases and separate application. Lets say i have my application called "cost management" there i will be using two database connection: default one for the cost management and user-connection to connect to user database. Although the idea with external authentification provider is better, the best thing to do would be to create some kind of user API that i can use to authenticate any type of application mobile/web and use this api trough some kind of custom authentification provider - i know this is bit more complicated to do just for home apps but it could be fun :).

Best,
Domagoj

Luis Zárate

unread,
Mar 16, 2015, 3:16:27 PM3/16/15
to django...@googlegroups.com
You maybe need to take a look documentation of using routes.
https://docs.djangoproject.com/en/1.7/topics/db/multi-db/#using-routers



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3ea8828d-0f31-4654-bfdc-3753738080e5%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
"La utopía sirve para caminar" Fernando Birri


Reply all
Reply to author
Forward
0 new messages