You can put funcitons in a module (say yourapp/modules/yourmodule.py) and import it
from applicaiton/yourapp/modules/yourmodule import * mind that they will not global variables (db, request, etc.) and you have to pass the explicitly to the functions in the module. Massimo On Apr 8, 8:30 pm, "[email protected]" <[email protected]> wrote: > How can I call common private (not exposed) functions from many > different controllers. I thought that in MVC this was something that > could be placed in the model if the functions dealt with data. Is it > possible to have functions that in essence protect the DB from changes > and are a gate keep to the models so that the controllers only access > these functions which then talk to the db? Also is it possible to have > a controller file that is central to all controllers and that they can > all call the methods of? > Thanks. > > -Alex --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" 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/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

