Package advene :: Package server :: Module webcherry :: Class Admin
[hide private]
[frames] | no frames]

Class Admin

source code

Common --+
         |
        Admin

Handles the /admin requests.

The /admin folder contains the following elements for the administration of the server:

Accessing the /admin folder itself displays the summary (equivalent to the root document).

Loading, saving or deleting packages is done by specifying the alias parameter. In the case of the /admin/load action, the uri parameter must provide the appropriate URI.

Setting the display mode

Accessing the /admin/display element updates the server display mode. The data should be available as a parameter named mode, which is either default or raw, or as last element in the URI, for instance /admin/display/navigation

Instance Methods [hide private]
 
index(self)
Display the main administration page.
source code
 
list(self)
Display available Advene files.
source code
 
load(self, *args, **query)
Load the specified URI with the given alias.
source code
 
delete(self, alias)
Unload a package.
source code
 
save(self, alias=None)
Save a package.
source code
 
reset(self)
Reset packages list.
source code
 
halt(self)
Halt server.
source code
 
display(self, mode=None)
Set display mode.
source code
    Inherited from Common
 
__init__(self, controller=None) source code
 
_cpOnError(self)
Error message handling.
source code
string
image_type(self, o)
Return the image type (mime) of the object.
source code
string
location_bar(self)
Returns a string representing the active location bar.
source code
 
no_cache(self)
Write the cache-control headers in the response.
source code
 
send_error(self, status=404, message=None)
Sends an error response.
source code
 
send_no_content(self)
Sends a No Content (204) response.
source code
 
send_redirect(self, location)
Sends a redirect response.
source code
 
start_html(self, title='', headers=None, head_section=None, body_attributes='', mode=None, mimetype=None, duplicate_title=False, cache=False)
Starts writing a HTML response (header + common body start).
source code
Class Variables [hide private]
list l
dict query
Method Details [hide private]

index(self)

source code 

Display the main administration page.

This method displays the administration page of the server, which should link to all functionalities.

list(self)

source code 

Display available Advene files.

This method displays the data files in the data directory. Maybe it should be removed when the server runs embedded.