title: web2py use of modules
body: <p>I have a python function in modules in web2py to send e-mails.It has the following code</p>
  
  <pre><code>message = response.render('scheduler/connectionmessage.html',cont)
  </code></pre>
  
  <p>I get the error </p>
  
  <pre><code>&lt;type 'exceptions.NameError'&gt; name 'response' is not defined"
  </code></pre>
  
  <p>How can I make render available in modules? The objective is to have a few such scripts under modules and execute them via scheduler from a stub under controllers.
  More code - </p>
  
  <pre><code>def send_email_invites():
    from gluon import *
    from gluon.template import render 
    db = current.db
    ......&lt;execute query and populate dictionary&gt;
    message = response.render('scheduler/connectionmessage.html',cont)
  </code></pre>
  
  <p>That is about it.</p>