5.2.12 Easy object access in templates

We have seen that the global Draco objects are available by importing their global instance that is stored in the module in which the object is defined. For example, to access the database object in a handler, we must first use:

from draco.database import database

The same is true for code inside a template, but, for your convenience, this step is made optional. All global draco objects, i.e. logger, config, database, client, server, request, response, cookies, application, session, and user are already available and need not be imported. This is also true for the global draco module.