The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> Python Programming
|
templated documents
Discuss templated documents in the Python Programming forum on Dev Shed. templated documents Python Programming forum discussing coding techniques, tips and tricks, and Zope related information. Python was designed from the ground up to be a completely object-oriented programming language.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

March 29th, 2004, 10:54 PM
|
|
Contributing User
|
|
Join Date: Jan 2004
Posts: 84
Time spent in forums: 8 h 7 m
Reputation Power: 10
|
|
|
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.
|

March 29th, 2004, 11:38 PM
|
|
Registered User
|
|
Join Date: Apr 2003
Posts: 25
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
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. 
|

March 30th, 2004, 01:43 AM
|
|
Python/RDF Freak
|
|
Join Date: Oct 2003
Posts: 14
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|

March 30th, 2004, 02:06 AM
|
|
Contributing User
|
|
Join Date: Feb 2004
Location: London, England
|
|
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
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|