Python Templates for Web Designers

What are some good templates for web designers? I definitely have my own preferences regarding what I would like to work with as a programmer. But web designers seem to think differently about things and therefore may prefer a different system.

So:

  • Web designers: which template do you prefer to work with?
  • programmers: what engine template did you work with, which made working with web designers easier?
+5
source share
7 answers

Take a look at Mako .

This is how I deal with web designers.

  • Ask them to make fun of the page. In HTML.
  • Use HTML as the basis for the template, replacing the tagged content with a ${...}replacement.
  • .

if- , - , .

+5

Django templating engine . , . Python, . , Django, , , Django .

: -, - insin.

+6

, .

:

Jinja2.

Nice , .

. , . ( ).

, - , :

>>> import jinja2
>>> print jinja2.Environment().compile('{% for row in data %}{{ row.name | upper }}{% endfor %}', raw=True) 
from __future__ import division
from jinja2.runtime import LoopContext, Context, TemplateReference, Macro, Markup, TemplateRuntimeError, missing, concat, escape, markup_join, unicode_join
name = None

def root(context, environment=environment):
    l_data = context.resolve('data')
    t_1 = environment.filters['upper']
    if 0: yield None
    for l_row in l_data:
        if 0: yield None
        yield unicode(t_1(environment.getattr(l_row, 'name')))

blocks = {}
debug_info = '1=9'

Jinja2. , (, if 0: yield None)

+6

Cheetah, . , , - , . , ... .

+2

@Jaime Soriano, Genshi - , Trac post-0.11. , HTML/XHTML. XSS.

+2

Clearsilver, , Trac 0.11, , Google Groups Orkut. , .

+1

, . , , " " db-, , XML- (SimpleTAL, Genshi ..).

-, -, Dreamweaver . , , , . , .

WYSIWYG, , , .

+1
source

All Articles