Hi, On 3 Feb., 18:41, mguthrie <[email protected]> wrote: > I'm looking at creating an application that would use Django Auth for > managing users but once logged in the user will "belong" only to a > specific organization and can only work with data associated with that > organization. I've looked at using the Django Sites contrib but I > would like something that is dynamically assigned and not specified in > the settings file like sites. > > What would be the best route to adding this functionality? From what > I've looked at so far it might be best to create a Manager that would > handle the model end of things and filter based off of the > organization id. > > Any ideas would be welcome. Also, is there a better way to do this > that wouldn't require having a separate DB for each organization? I > would like each account to be assigned to an organization unless it's > a superuser account which would be able to oversee the entire > application. > > Thanks in advance.
In app-engine-patch we have a DynamicSiteIDMiddleware which adjusts settings.SITE_ID for each request according to the current request's domain . I'm sure you could adapt our code to your needs: https://bitbucket.org/wkornewald/appenginepatch/src/tip/ragendja/sites/dynamicsite.py Bye, Waldemar Kornewald --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

