Package web2py :: Package gluon :: Module admin
[hide private]
[frames] | no frames]

Module admin

source code

This file is part of web2py Web Framework (Copyrighted, 2007-2010). Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu>. License: GPL v2

Utility functions for the Admin application

Functions [hide private]
 
apath(path='', r=None)
Builds a path inside an application folder
source code
 
app_pack(app, request)
Builds a w2p package for the application
source code
 
app_pack_compiled(app, request)
Builds a w2p bytecode-compiled package for the application
source code
 
app_cleanup(app, request)
Removes session, cache and error files
source code
 
app_compile(app, request)
Compiles the application
source code
 
app_create(app, request)
Create a copy of welcome.w2p (scaffolding) app
source code
 
app_install(app, fobj, request, filename)
Installs an application:
source code
 
app_uninstall(app, request)
Uninstalls the application.
source code
 
plugin_pack(app, plugin_name, request)
Builds a w2p package for the application
source code
 
plugin_install(app, fobj, request, filename)
Installs an application:
source code
 
check_new_version(myversion, version_URL)
Compares current web2py's version with the latest stable web2py version.
source code
Function Details [hide private]

apath(path='', r=None)

source code 

Builds a path inside an application folder

Parameters
----------
path:
    path within the application folder
r:
    the global request object

app_pack(app, request)

source code 

Builds a w2p package for the application

Parameters
----------
app:
    application name
request:
    the global request object

Returns
-------
filename:
    filename of the w2p file or None on error

app_pack_compiled(app, request)

source code 

Builds a w2p bytecode-compiled package for the application

Parameters
----------
app:
    application name
request:
    the global request object

Returns
-------
filename:
    filename of the w2p file or None on error

app_cleanup(app, request)

source code 

Removes session, cache and error files

Parameters
----------
app:
    application name
request:
    the global request object

app_compile(app, request)

source code 

Compiles the application

Parameters
----------
app:
    application name
request:
    the global request object

app_create(app, request)

source code 

Create a copy of welcome.w2p (scaffolding) app

Parameters
----------
app:
    application name
request:
    the global request object

app_install(app, fobj, request, filename)

source code 

Installs an application:

- Identifies file type by filename
- Writes `fobj` contents to the `../deposit/` folder
- Calls `w2p_unpack()` to do the job.

Parameters
----------
app:
    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
-------
upname:
    name of the file where app is temporarily stored or `None` on failure

app_uninstall(app, request)

source code 

Uninstalls the application.

Parameters
----------
app:
    application name
request:
    the global request object

Returns
-------
`True` on success, `False` on failure

plugin_pack(app, plugin_name, request)

source code 

Builds a w2p package for the application

Parameters
----------
app:
    application name
plugin_name:
    the name of the plugin without plugin_ prefix
request:
    the current request app

Returns
-------
filename:
    filename of the w2p file or None on error

plugin_install(app, fobj, request, filename)

source code 

Installs an application:

- Identifies file type by filename
- Writes `fobj` contents to the `../deposit/` folder
- Calls `w2p_unpack()` to do the job.

Parameters
----------
app:
    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
-------
upname:
    name of the file where app is temporarily stored or `None` on failure

check_new_version(myversion, version_URL)

source code 

Compares current web2py's version with the latest stable web2py version.

Parameters
----------
myversion:
    the current version as stored in file `web2py/VERSION`
version_URL:
    the URL that contains the version of the latest stable release

Returns
-------
state:
    `True` if upgrade available, `False` if current version if up-to-date,
    -1 on error
version:
    the most up-to-version available