On 3/16/06, Jorge Godoy <[EMAIL PROTECTED]> wrote: > I "know" how to make Paste uses its WSGI features to dispatch each URL to some > WSGI enabled application, I "know" how to write code with CP that is WSGI > enabled... What I haven't seen, yet, is how to make the modules. I mean, I > have a module "blog" and a module "forum" (I believe those are from Ian's > blog). How can I run both projects independently? Or should I put them on > the same project and import them?
Though there are details that are not hammered out, what I'm about to say works in First Class already: you can either include both the blog and forum in a site by setting up their URLs and options in a config file *or* by making a CherryPy-style controller that includes the blog and forum in there. > I believe it goes down to two things: > > NOTE:. I'm adding the wsgi prefix just to make it clear that needed > changes to make the application WSGI were done (or > automatically generated by TG, what would be great...) > > - Would it be something like (using TG's start script) > > wsgistart-forumapp.py > wsgistart-blogapp.py > > or > > wsgistart-app.py > > and in controllers.py from "app" I'd have "from blog import blogRoot", > "from forum import forumRoot"? The start scripts actually appear to be disappearing with First Class. You just run tg-admin serve The config file will tell it what to do. > - Should each wsgi application be something generated with "tg-admin > wsgi-quickstart" (or paster or ...) or something more close to a Python > module? (Suppose that they access the database to manipulate data.) Quickstart will not actually change in any significant way. Just make apps the way you always have! Kevin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears Trunk" 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/turbogears-trunk -~----------~----~----~----~------~----~------~--~---
