Skipole WSGI generator.


Introduction Getting Started Your Code start_call submit_data end_call skicall skicall.page_data Serving wsgi

Development at GitHub:

Your project Python code

The projectfiles directory containing project myproj should have been created as previously described. Within it you will be developing ...projectfiles/ will already be set up to do most of the following work, but in summary, it needs to import the WSGIApplication class.

Creating an instance of this WSGISpplication object creates an 'application' which can be used by any WSGI web server.

An instance is created within with the lines:

    from skipole import WSGIApplication
    application = WSGIApplication(project='myproj',

Where 'PROJECTFILES' is the path to your projectfiles directory - this informs the object where the project JSON files can be found.

start_call, submit_data and end_call are three functions that you will provide. Minimum versions are available in which you will develop further. They are called during the progress of a call:

start_call(called_ident, skicall)

start_call is called when the server initially receives an incoming call.


submit_data is called by Responder pages.

end_call(page_ident, page_type, skicall)

end_call is called after any Responders have handled the call and prior to returning the page.

These functions can in turn call on any further modules you wish to include within the package - hence you can access your own databases and functionality.

You will notice the framework passes the skicall object to your functions which contains a good deal of information you will need, more about it is given here:skicall

In particular your functions will modify the skicall.page_data attribute which will set field values in the page finally returned to the client. For further details:skicall.page_data

Before the application is ready, it needs to have the application from the 'skis' project added to it. Within you will see this is done with:

    from skipole import skis
    skis_application = skis.makeapp()
    application.add_project(skis_application, url='/lib')

This 'skis' application serves javascript files used by the framework, so it is always needed.


Your module also imports four exceptions which you can use in your functions:

from skipole import FailPage, GoTo, ValidateError, ServerError

Further information about the exceptions and their arguments can be found at:

FailPage(message = '', section='', widget='', failpage=None)

GoTo(target, clear_submitted=False, clear_page_data=False)

ValidateError(message = '', section='', widget='', status='400 Bad Request')

ServerError(message = '', section='', widget='', status='500 Internal Server Error', code=0)

Further information is available within the skiadmin pages, and the Documentation link to the left.