Home | Trees | Indices | Help |
|
---|
|
| 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) Utility functions for the Admin application -------------------------------------------
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
__package__ =
|
|
Builds a path inside an application folder Args: path(str): path within the application folder r: the global request object |
Builds a w2p package for the application Args: app(str): application name request: the global request object Returns: filename of the w2p file or None on error |
Builds a w2p bytecode-compiled package for the application Args: app(str): application name request: the global request object Returns: filename of the w2p file or None on error |
Removes session, cache and error files Args: app(str): application name request: the global request object Returns: True if everything went ok, False otherwise |
Compiles the application Args: app(str): application name request: the global request object Returns: None if everything went ok, traceback text if errors are found |
Create a copy of welcome.w2p (scaffolding) app Args: app(str): application name request: the global request object |
Installs an application: - Identifies file type by filename - Writes `fobj` contents to the `../deposit/` folder - Calls `w2p_unpack()` to do the job. Args: app(str): new application name fobj(obj): file object containing the application to be installed request: the global request object filename(str): original filename of the `fobj`, required to determine extension overwrite(bool): force overwrite of existing application Returns: name of the file where app is temporarily stored or `None` on failure |
Uninstalls the application. Args: app(str): application name request: the global request object Returns: `True` on success, `False` on failure |
Builds a w2p package for the plugin Args: app(str): application name plugin_name(str): the name of the plugin without `plugin_` prefix request: the current request app Returns: filename of the w2p file or False on error |
Installs a plugin: - Identifies file type by filename - Writes `fobj` contents to the `../deposit/` folder - Calls `w2p_unpack_plugin()` to do the job. Args: app(str): new application name fobj: file object containing the application to be installed request: the global request object filename: original filename of the `fobj`, required to determine extension Returns: name of the file where plugin is temporarily stored or `False` on failure |
Compares current web2py's version with the latest stable web2py version. Args: myversion: the current version as stored in file `web2py/VERSION` version_URL: the URL that contains the version of the latest stable release Returns: tuple: state, version - state : `True` if upgrade available, `False` if current version is up-to-date, -1 on error - version : the most up-to-version available |
Unzips filename into dir (.zip only, no .gz etc) Args: filename(str): archive dir(str): destination subfolder(str): if != '' unzips only files in subfolder |
Upgrades web2py (src, osx, win) if a new version is posted. It detects whether src, osx or win is running and downloads the right one Args: request: the current request object (required to determine version and path) url: the incomplete url where to locate the latest web2py (actual url is url+'/examples/static/web2py_(src|osx|win).zip') Returns tuple: completed, traceback - completed: True on success, False on failure (network problem or old version) - traceback: None on success, raised exception details on failure |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Mar 16 02:36:09 2014 | http://epydoc.sourceforge.net |