March 29th, 2004, 10:54 PM
Hey all, I am looking for a way to generate documents using a template. For example, the user enters some data, like a name, number, salary, etc and fill in a few checkboxes. I'm not really sure how I would generate the visual features, like the checkboxes with ticks in them, etc.
Would the easiest way be to do this as a CGI script, and make use of the HTML elements and also the ability to print from the browser? Or does anyone know of a better way to do it?
Cheers for any help.
March 29th, 2004, 11:38 PM
I would use Quixote. It uses PTL and should be easy for what you want to do.
I've never used it, but it sounds simple if you know HTML.
March 30th, 2004, 01:43 AM
March 30th, 2004, 02:06 AM
There are a wealth of python solutions for both server-side programming and templating - see http://www.python.org/cgi-bin/moinmoin/WebProgramming for a fairly complete list.
For the templating part, I too have used Cheetah and found it to be very powerful and flexible. The abilitity to create an inheritance heirarchy of templates puts it head and shoulders ahead of any other solution that I know about in Python, Java, PHP or Perl. (Although there are many alternatives that I have not seen, so it may not be totally unique in this).
IMHO one problem that Python has as a server-side solution is that there are TOO MANY alternatives to choose from - If you are using PHP or ASP then it is all built into the language, so you do not have a choice. If you are using Java then Servlets and JSP are the official standard, etc. However in Python there is 'more than one way to do it', so there is a dazzling array of alternatives each with its own community of users, but none of them big enough on their own to make an impact against the other languages. The dominant solution in Python is Zope and Plone, which are great if you are creating a large, complex site with many contributors, but is way too complex if you just want a handful of dynamic pages in an otherwise static site. There was some discussion on comp.lang.python a while ago about merging some of the alternatives and creating a standard solution, but I don't know if anyone is taking it further.
Dave - The Developers' Coach