Dictionary of additional cookies appended by custom code
The database connection webnotes.db.Database setup by auth
Wrapper function for os.makedirs (does not throw exception if directory exists)
List of exceptions to be shown in the Error Console
The cgi.FieldStorage() object (Dictionary representing the formdata from the URL)
Flag to identify if system is in Testing Mode
List of messages to be shown to the user in a popup box at the end of the request
Append to the message_log
The JSON response object. Default is:
{'message':'', 'exc':''}
Global session dictionary.
“v170”
Open a database connection with the given parmeters, if use_default is True, use the login details from defs.py. This is called by the request handler and is accessible using the conn global variable. the sql method is also global to run queries
Update in_transaction and check if “START TRANSACTION” is not called twice
Convert the given result set to a list of lists (with cleaned up dates and decimals)
Get list of all tables for which tab is to be replaced by test before a query is executed
Get a single / multiple value from a record.
For Single DocType, let docname be = None
A profile object is created at the beginning of every request with details of the use. The global profile object is webnotes.user
Internal - get list of DocType where key is allowed. Key is either ‘read’, ‘write’ or ‘create’
Get list of DocTypes the user can create. Will filter DocTypes tagged with ‘not_in_create’ and table
Run tests from modules. Sets up database connection, modules path and session before running test
Usage: from shell, run
python tests.py [test modules]
if no modules are specified, it will run all “tests.py” files from all modules