Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use case for Django user groups #15

Closed
iceboxx89 opened this issue Jul 12, 2014 · 1 comment
Closed

Use case for Django user groups #15

iceboxx89 opened this issue Jul 12, 2014 · 1 comment

Comments

@iceboxx89
Copy link

hi,
i am curious weather i can use django-multidb-router in a app where i have to, 'route to a different db based on the group the current user belongs to' for example if the user belongs to a group called artists i want to use the 'default' and so on.? The said databases are different in the settings file, they are on the same host but use a different user and password.

@jsocol
Copy link
Collaborator

jsocol commented Jul 12, 2014

Django multidb router adds support for master/slave replication to Django, where reads should come off one or more slave DBs and writes should go to the master. Django's DB router support generally works at the model level (e.g. "auth_users" on one DB, "myapp_mytype" in another) but if you check the docs you might be able to find a way to do this.

@jsocol jsocol closed this as completed Jul 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants