I am working with a legacy web application based off of Turbogears 1.1 (CherryPy 2.3) and I would like to integrate it with a Django 1.4 web application. What I would like to do ideally is find some way for both applications to share authentication/session state so that the experience is seamless to the user. Both applications can run on the same server and technically can access the same mysql database instance.
Initial thoughts are that this could be achieved by:
- Storing session data in a shared database
- Use the Django application as a 'master' that would issue requests via http to the turbogears application
- Running the Django application from within Cherrpy via the internal CherryPyWSGIServer
Any other suggestions would be welcome!
I would suggest looking into creating a custom Django auth and session backend which reuses the existing Turbogears data. You will likely also find it necessary to use Django 1.5's configurable user model.