On Jun 14, 7:19 pm, Richard <richar...@gmail.com> wrote:
> have a look at some of the example apps:http://web2py.com/appliances
>
> The main issue with migrating model/controller code into modules is
> you no longer have access to the global variables like db/session/etc.
> So you have to pass these variables explicitly to the modules when
> needed.

... or feature - in any case, if it is an issue, it will help you
think about how to decouple common code (i.e.  can be a good feature)

>
> On Jun 15, 7:11 am, David Mitchell <monch1...@gmail.com> 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.

Reply via email to