[Repoze-dev] Chameleon and Genshi Text Templates

2011-02-14 Thread Brian Sutherland
Hi,

The genshi text template language doesn't seem to work at all with
chameleon.genshi:

http://genshi.edgewall.org/wiki/Documentation/text-templates.html

In fact it seems that chameleon.genshi.template.GenshiTextTemplate
cannot do anything more than string substitution. Am I missing
something obvious?

I've attached a test that I would have expected to have worked, should I
commit that?

-- 
Brian Sutherland
import unittest

class TestExplicitDoctypes(unittest.TestCase):

def test_for(self):
from chameleon.genshi.template import GenshiTextTemplate
template = u{% for item in foo %}* xxx\n{% end %}
t = GenshiTextTemplate(template)
self.assertEqual(t(foo=[1, 2]), * xxx\n* xxx\n)

def test_suite():
import sys
return unittest.findTestCases(sys.modules[__name__])
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] Chameleon and Genshi Text Templates

2011-02-14 Thread Malthe Borch
Hey Brian,

That's right. It hasn't been implemented and it's a bit of false
advertisement really.

That said, implementing it should be relatively straight-forward.

\malthe

On 14 February 2011 17:20, Brian Sutherland br...@vanguardistas.net wrote:
 Hi,

 The genshi text template language doesn't seem to work at all with
 chameleon.genshi:

    http://genshi.edgewall.org/wiki/Documentation/text-templates.html

 In fact it seems that chameleon.genshi.template.GenshiTextTemplate
 cannot do anything more than string substitution. Am I missing
 something obvious?

 I've attached a test that I would have expected to have worked, should I
 commit that?

 --
 Brian Sutherland

 ___
 Repoze-dev mailing list
 Repoze-dev@lists.repoze.org
 http://lists.repoze.org/listinfo/repoze-dev


___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] Chameleon and Genshi Text Templates

2011-02-14 Thread Brian Sutherland
On Mon, Feb 14, 2011 at 05:22:34PM +0100, Malthe Borch wrote:
 Hey Brian,
 
 That's right. It hasn't been implemented and it's a bit of false
 advertisement really.
 
 That said, implementing it should be relatively straight-forward.

I see. Unfortunately at the moment I have too much other stuff going on
to have a look. Also what we're doing is not performance critical so I
guess we'll go back to using the original genshi for the time being...

 \malthe
 
 On 14 February 2011 17:20, Brian Sutherland br...@vanguardistas.net wrote:
  Hi,
 
  The genshi text template language doesn't seem to work at all with
  chameleon.genshi:
 
     http://genshi.edgewall.org/wiki/Documentation/text-templates.html
 
  In fact it seems that chameleon.genshi.template.GenshiTextTemplate
  cannot do anything more than string substitution. Am I missing
  something obvious?
 
  I've attached a test that I would have expected to have worked, should I
  commit that?
 
  --
  Brian Sutherland
 
  ___
  Repoze-dev mailing list
  Repoze-dev@lists.repoze.org
  http://lists.repoze.org/listinfo/repoze-dev
 
 

-- 
Brian Sutherland
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev