> > Can you explain more how Django and Pylons are being run as a > composite application and why you need to do this?
Well, it's more of an experiment so far. I have big (legacy) Pylons app and I plan to add further Django code to extend the site. > If you are merely trying to have one appear at a sub URL context of > the other, but there is no interaction between the two, you would be > better off mounting them as separate WSGI applications at > Apache/mod_wsgi level rather than trying to use Pylons feature to do > the same. Benefit of this is that they can run in separate sub > interpreters or even daemon processes and thus not interfere with each > other. > > Only reasons can think to using Pylons to composite them together is > if one is providing session management for the other to get SSO, or if > WSGI middleware being used to modify the response of the other. Yup, that's the idea. I want common user auth. May be I should re-think this and let them run separatedly. There is also issue of url mapping. Say I want /foo and /bar to be mapped to my django app, while / and /quux to my pylons app. Is it possible? > Was this virtual environment created with --no-site-packages or is it > chained off main Python installation and therefore inheriting > packages/modules from main Python installation as well. > > If chained off main Python installation, are there versions of > packages/modules in main Python installation site-packages directory > which are also separately installed in the virtual environment. It was created with simple "virtualenv py" command, no extra args. > This suggest that you have the .wsgi file in parent directory to both > projects. This wouldn't generally be recommended, as for > Apache/mod_wsgi to be able to use that file, you would have needed a > Directory directive for directory saying Apache can uses files in that > directory. That is, would have 'Allow from all'. Since source code now > subordinate to that directory, if you were to stuff up Apache > configuration and expose that directory, someone could possibly get > your source code. Thus better for .wsgi file to be in directory of its > own with nothing else important in that directory or a sub directory > of it and only that directory exposed through Apache. That way less > risk of exposing source code. Got it. Updated. > This is what I don't understand. The entry point is the Django > application. How does the Pylons application get mapped into URL > namespace or invoked? It is not. :) I was planning to use paste's URL composite middleware but stuck with the error above. I added assertion about django.settings after pylons app, it still passes. I added these lines as well: print >> sys.stderr, "#1 %s" % doudj.settings.__file__ print >> sys.stderr, "#2 %s" % dir(doudj) print >> sys.stderr, "#3 %s" % dir(doudj.settings) print >> sys.stderr, "#4 %s" % doudj.settings.ROOT_URLCONF It correctly prints out #4 doudj.urls %) And then I get AttributeError: 'module' object has no attribute 'ROOT_URLCONF' I suppose DJango somehow somewhere finds _other_ settings.py Max. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "modwsgi" 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/modwsgi?hl=en -~----------~----~----~----~------~----~------~--~---
