Mercurial > genshi > mirror
annotate examples/basic/test.html @ 916:5ba6268420e7 experimental-py3k
add support for python 3 to genshi.filters:
* minor changes to track encoding=None API change in core genshi modules.
* renamed genshi/filters/tests/html.py to test_html.py to avoid clashes with Python 3 top-level html module when running tests subset.
* did not rename genshi/filters/html.py.
* i18n filters:
* ugettext and friends are gone in Python 3 (and only gettext and friends exist and they now handle unicode)
* Some \ line continuations inside doctests confused 2to3 and so were removed them.
* Testing picked up a problem (already present in trunk) where Translator.__call__ could end up defining gettext as an endlessly recursive function. Noted with a TODO.
author | hodgestar |
---|---|
date | Sun, 24 Oct 2010 22:21:28 +0000 |
parents | 2aa7ca37ae6a |
children |
rev | line source |
---|---|
3 | 1 <!DOCTYPE html |
2 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
4 <html xmlns="http://www.w3.org/1999/xhtml" | |
230 | 5 xmlns:py="http://genshi.edgewall.org/" |
21
b4d17897d053
* Include paths are now interpreted relative to the path of the including template. Closes #3.
cmlenz
parents:
3
diff
changeset
|
6 xmlns:xi="http://www.w3.org/2001/XInclude" |
b4d17897d053
* Include paths are now interpreted relative to the path of the including template. Closes #3.
cmlenz
parents:
3
diff
changeset
|
7 lang="en"> |
b4d17897d053
* Include paths are now interpreted relative to the path of the including template. Closes #3.
cmlenz
parents:
3
diff
changeset
|
8 <xi:include href="layout.html" /> |
3 | 9 <xi:include href="custom_stuff.html"><xi:fallback/></xi:include> |
10 <body class="$bozz"> | |
11 <ul py:attrs="{'id': 'second', 'class': None}" py:if="len(items) > 0"> | |
12 <li py:for="item in items">Item $prefix${item.split()[-1]}</li> | |
13 </ul> | |
14 ${macro1()} ${macro1()} ${macro1()} | |
15 ${macro2('john')} | |
16 ${macro2('kate', classname='collapsed')} | |
17 <div py:content="macro2('helmut')" py:strip="">Replace me</div> | |
18 <greeting name="Dude" /> | |
19 <greeting name="King" /> | |
20 <span class="greeting">Hello Silicon</span> | |
21 </body> | |
22 </html> |