Simple Page Template Server

A simple way to do GUIs quickly and easily using Page Templates

Simple Page Template Server (spats) is a library for creating GUI's quickly and easily using Page Templates and HTML.

At Enfold we had several projects that required simple user interface's. Usually a few forms, a bit of user interaction, that's it. These were user interfaces that could not be run inside a full fledged web server, for example a controller for stopping and starting Plone. That works much better outside Plone than in it.

With lots of resources and knowledge with Page Templates we built a simple framework for writing user interfaces. First spats starts a web server that serves out Page Templates, it will also serve out text, images and the usual components. This uses the Python standard library. Secondly a window is created that embeds a web browser pointing at the web server.

From a users point of view it's a standard application. They know nothing about it being a web server serving back the content. Its an application that has all the usual ways of resizing, closing etc. The first release features wrappers for Windows (using Python win32) and wxPython.

If you would like to go a step further, the same application since its a web server can now be run just as a web server. The first release features wrappers for running from a command line and a Windows taskbar. Unix daemon wrappers are on the way.

Features:

  • The goal is simplicity - it responds to GET's and sends Page Templates back. No POST or any other verbs.
  • Security: not much, started work on this should be improved later.
  • Scripts are allowed, but not called directly, you can write Python scripts
  • Documentation is sparse, but examples will be on the way soon.

Why would you want this over say Plone or mod_python? Simplicity is nice, the entire library is around 300 lines. That's way easier to debug and manage. It makes its easy to install and run. Further bear in mind that the application is being run on the users box as that user. That means you aren't writing web apps, you are building a local application. Please see the file manager demo application for details on this.

Download

Available versions of the software can be found in the download area.