Best approach for multiple sites in a single deployment?
I would like to create a subdomain based authentication system, like the one on 37signals, freshbooks, codebase, etc. The objective is to do something like smaller but in far smaller scale (I suppose a maximum of 100-1000 blogs). All other models (blog posts, comments, etc) already have a foreign key to Site.
1. How can I allow different users to have the same username in different sites? How can I make so that when a user logs in, he logged in to a specific site (logging on blog A does not log you to blog B).
For allowing the same username in different sites I guess I'd have to write my own authentication backend and a new model for User, as I don't see how the default User model would fit. Is this a good approach?
2. Is there anyway to make the sites framework fetch the current site based on the subdomain instead of the settings? Or am I seeing this the wrong way?
My plan was to use a single deployment for everything and use the sites framework, but as far as I've understood, the sites framework relies on the settings.SITE_ID parameter, which would be the same for a single deployment. What would be a good approach here? Creating a new settings file for each new blog?
Many thanks in advance!
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/zQimMoWFGNUJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home