Package web2py :: Package gluon :: Module tools

[hide private]
[frames] | no frames]

# Module tools

source code
This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

Classes | [hide private]

| Mail Class for configuring and sending emails with alternative text / html body, multiple attachments and encryption support
| Recaptcha
| Auth Class for authentication, authorization, role based access control.
| Crud
| Service
| PluginManager Plugin Manager is similar to a storage object but it is a single level singleton this means that multiple instances within the same thread share the same attributes Its constructor is also special.
| Expose

Functions | [hide private]

DEFAULT() | source code

callback(actions, form, tablename=global_settings.applications_parent) | source code

validators(*a) | source code

call_or_redirect(f, *args) | source code

replace_id(url, form) | source code

addrow(form, a, b, c, style, _id, position=-1) | source code

fetch(url, data=global_settings.applications_parent, headers=global_settings.applications_parent, cookie=<SimpleCookie: >, user_agent=`'``Mozilla/5.0``'`) | source code

geocode(address) | source code

universal_caller(f, *a, **b) | source code

completion(callback) Executes a task on completion of the called action. | source code

prettydate(d, T=<function <lambda> at 0x2fc8b90>) | source code

test_thread_separation() | source code

Variables | [hide private]

| logger = `logging.getLogger("web2py")`
| regex_geocode = `re.compile(r'<coordinates>`(?P<``la``>``[^`,`]``*``)`,`(?P<``lo``...``
| ON = `True`
| TAG = `<gluon.html.__TAG__ object at 0x2af5fdbd0790>`
| current = `<thread._local object at 0x2af5fdbfc930>`

Function Details | [hide private]

### completion(callback)

source code

    Executes a task on completion of the called action. For example:

        from gluon.tools import completion
        @completion(lambda d: logging.info(repr(d)))
        def index():
            return dict(message='hello')

    It logs the output of the function every time input is called.
    The argument of completion is executed in a new thread.

Variables Details | [hide private]

### regex_geocode

Value:

      re.compile(r'<coordinates>(?P<la>[^,]*),(?P<lo>[^,]*).*?</coordinates>
      ')