On Apr 23, 2007, at 2:18 PM, Jose Galvez wrote:

> Hi all, I've got a what I hope is a simple question.  Occasionally  
> I have to make a small change to the logic in an existing  
> controller.  Now pylons is running as a service and I really don't  
> like to reload the entire pylons service (other users may be using  
> one if the database based controller and I don't want to risk their  
> loosing their data) but I would like to simply reload the single  
> controller.  This proved to be simple enough to implement (with all  
> the caution statements about the thread safety of reloading  
> controllers and what you should and should not try to reload).   
> However now for my new dilemma, is it possible to add a new  
> controller to an existing pylons application without having to  
> restart the service? This would come in handy if I have added new  
> features to a website with little or no impact on the remainder of  
> the site, If I could just upload the required controllers and their  
> templates (or what ever support files they needed) it would be nice  
> to make them immediately available without having to wait for a  
> good time to restart the service.  As usual thanks in advance for  
> any and all help.

For Routes to become aware of a new controller, either a new route  
can be added, or you can just reset a flag on the mapper object.

map._created_regs = False

It will then re-scan the controller directory before the next URL  
resolve.

Cheers,
Ben

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to