#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    84
    Rep Power
    11

    templated documents


    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.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    25
    Rep Power
    0

    Lightbulb


    I would use Quixote. It uses PTL and should be easy for what you want to do.
    Quixote
    I've never used it, but it sounds simple if you know HTML.
  4. #3
  5. No Profile Picture
    Python/RDF Freak
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Posts
    14
    Rep Power
    0
    For cgi I used the jonpy module .

    For generating webpages I used the Cheetah Template Engine .

    hope you can use this.
    greetings,
    johan
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    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

IMN logo majestic logo threadwatch logo seochat tools logo