On Jun 14, 4:21 pm, "Robert O'Connor" <[email protected]> wrote: > throw it into the "modules" directory in its own file say foo.py > -Rob
.... or perhaps utils.py - note that modules will need to be imported everywhere you want to use them (which is ok - use local_import()); An alternative is to add a utils.py into models, where they will always be read into context (no local_import() required). > > > > On Mon, Jun 14, 2010 at 5:11 PM, David Mitchell <[email protected]> wrote: > > Hello all, > > > I'm at early days in my 1st serious web2py project, and I've got a few bits > > of code that are common to multiple different controllers. > > > I want to move these code blocks into their own separate code module so > > they can be maintained at a single place, but I can't find any documentation > > about how to structure such a module nor how to call it from my controllers. > > > Any tips or URL pointers? > > > Thanks in advance > > > Dave M.

