On Wed, Dec 1, 2010 at 5:16 PM, Lakshman Prasad <scorpion...@gmail.com>wrote:
> If I understand what you are saying, > > You have 2 different projects in django, (in different repos) and you don't > want to have user logged in, in each site. > They are in the same repository. Yes we do not want user to log in at both the places. > > The *simplest* way to solve this is to configure the django.contrib.auth of > both the projects to use the same database. - And yes, it is a goddamn > database. Any number of separate projects can open connections to it. > Yes the two projects are sharing the same database. > Details about using multiple databases in projects can be found in the > documentation: > > http://docs.djangoproject.com/en/dev/topics/db/multi-db/#defining-your-databases > > < > http://docs.djangoproject.com/en/dev/topics/db/multi-db/#defining-your-databases > >Essentially > you will need to define the routers and for this case, the router is just a > lambda that gives the user database if the app is django.contrib.auth. > > > The problem is that I do not understand how to make apache redirect requests to their respective projects. Say the projects, project1 and project2, have their respective urls.py file. When the url is www.test.com/account/login -- the request should be redirected to project1, because only the urls file in the project1 knows how to resolve it. as the url changes to www.test.com/profile -- the request should be redirected to project2. (say profile requires user to be authenticated, then as you and siddharta mentioned that user authentication is taken care by django.contrib.auth backend and the two projects are already sharing the same database, there should not be any problem in passing the user_context between the two projects). I need some links which will help me configure apache in the desired way. That will help a great deal. Thanks all. _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers