Michele Simionato wrote:
Also, one could argue that the designer should
not get in touch with the HTML, but just play with the CSS.
Finally, you can achieve separation between logic and presentation just
putting the routines generating the HTML pages in a separate module, no need to
use
a
Michele Simionato wrote:
The problem is a problem of standardization, indeed. There plenty of
recipes to
do the same job, I just would like to use a blessed one (I am teaching
a Python
course and I do not know what to recommend to my students).
Why not teach your students to use a template system?
On Mon, 2005-02-21 at 07:36 -0500, Kent Johnson wrote:
Michele Simionato wrote:
The problem is a problem of standardization, indeed. There plenty of
recipes to
do the same job, I just would like to use a blessed one (I am teaching
a Python
course and I do not know what to recommend to
Kent Johnson:
I've written web pages this way (using a pretty nice Java HTML
generation package) and I don't
recommend it. In my experience, this approach has several drawbacks:
- as soon as the web page gets at all complex, the conceptual shift
from HTML to code and back is
difficult.
- It is
Michele Simionato wrote:
The problem is a problem of standardization, indeed.
There are plenty of recipes to do the same job, I just
would like to use a blessed one (I am teaching a Python
course and I do not know what to recommend to my students).
Wouldn't we *all* like all of our problems
Kent Johnson wrote:
Michele Simionato wrote:
The problem is a problem of standardization, indeed. There plenty
of
recipes to
do the same job, I just would like to use a blessed one (I am
teaching
a Python
course and I do not know what to recommend to my students).
Why not teach your
Matt Goodall [EMAIL PROTECTED] writes:
[...]
Agreed. Although I would go further and say that it's important to
choose a templating system that allows the Python developer to annotate
XHTML templates using **valid XML**, i.e. no for x in y loops, no if
foo conditionals, no i = 0 variable
Just to clarify, before people start pointing out their preferred
templating language: I am NOT asking for
a template system. I am asking for something on the
lines of HTMLGen, where you just use pure Python.
--
http://mail.python.org/mailman/listinfo/python-list
Here are a couple of pointers. I agree with Michele that it would be
nice to have some kind of standardization. Maybe this would be worth a
post to the Web-SIG ?
- I posted a 70-line recipe on the Python Cookbook, a sort of poor man's
HTMLGen called HTMLTags
Stan (part of nevow, which is part of twisted) is a nice python syntax
for building HTML - I like the use of () and [] to separate attributes
from sub-elements.
For example:
class Greeter(rend.Page):
def greet(self, context, data):
return random.choice([Hello, Greetings, Hi]), ,
xtian wrote:
Stan (part of nevow, which is part of twisted) is a nice python
syntax
for building HTML
[...]
I don't know how detachable it is from the rest of nevow. I'd assume
it
wouldn't be too difficult to implement in a standalone fashion.
FWIW I whipped up a simple self-contained Stan
The problem is a problem of standardization, indeed. There plenty of
recipes to
do the same job, I just would like to use a blessed one (I am teaching
a Python
course and I do not know what to recommend to my students).
FWIW, here is a my version of the recipe (stripped down to the bare
12 matches
Mail list logo