Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
pylons with chameleon?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  25 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
Iain Duncan  
View profile   Translate to Translated (View Original)
 More options 16 Sep, 20:06
From: Iain Duncan <iaindun...@telus.net>
Date: Wed, 16 Sep 2009 12:06:28 -0700
Local: Wed 16 Sep 2009 20:06
Subject: pylons with chameleon?
Hi folks, I have not built enough pylons to be know how to switch
templating languages beyond mako and genshi, but I'm interested in using
Chameleon. Has anyone got any examples up of what one needs to do to use
Chameleon?

thanks
Iain


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kevin J. Smith  
View profile   Translate to Translated (View Original)
 More options 16 Sep, 21:47
From: "Kevin J. Smith" <ke...@rootsmith.ca>
Date: Wed, 16 Sep 2009 13:47:10 -0700
Local: Wed 16 Sep 2009 21:47
Subject: Re: pylons with chameleon?

I am using pylons with SimpleTAL (ZPT implementation) templating and what I
did to wire it in to pylons was just follow the existing patterns
established by Mako and Genshi.  Basically, in the *lib* package I created a
template.py module and a *render_simpletal* function within it which takes a
template, the caching options, and any other params particular to the
templating engine and return the result of a call to pylon's *
cached_template* function.  *cached_template* takes the inner function named
*render_template* as a parameter and this is the function you need to
implement.  Basically just use the template's API to render a given template
and return it from this inner function.

2009/9/16 Iain Duncan <iaindun...@telus.net>

> Hi folks, I have not built enough pylons to be know how to switch
> templating languages beyond mako and genshi, but I'm interested in using
> Chameleon. Has anyone got any examples up of what one needs to do to use
> Chameleon?

> thanks
> Iain

--
Never take life seriously. Nobody gets out alive anyway.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wichert Akkerman  
View profile   Translate to Translated (View Original)
 More options 19 Sep, 08:40
From: Wichert Akkerman <wich...@wiggy.net>
Date: Sat, 19 Sep 2009 09:40:17 +0200
Local: Sat 19 Sep 2009 08:40
Subject: Re: pylons with chameleon?
On 2009-9-16 21:06, Iain Duncan wrote:

> Hi folks, I have not built enough pylons to be know how to switch
> templating languages beyond mako and genshi, but I'm interested in using
> Chameleon. Has anyone got any examples up of what one needs to do to use
> Chameleon?

In config/environment.py:

from genshi.template import TemplateLoader as GenshiTemplateLoader

def load_environment(global_conf, app_conf):
     ...
     ...

     # Create the chameleon TemplateLoader
     config['pylons.app_globals'].pt_loader = TemplateLoader(
         paths['templates'], auto_reload=True)

Add a new file in lib (mine is called lib/pt.py):

from pylons.templating import pylons_globals
from pylons.templating import cached_template

def render_pt(template_name, cache_key=None, cache_type=None,
                   cache_expire=None):
     """Render a page template with z3c.pt."""

     def render_template():
         globs = pylons_globals()
         template = globs["app_globals"].pt_loader.load(template_name)
         return template(**globs)

     return cached_template(template_name, render_template,
cache_key=cache_key,
             cache_type=cache_type, cache_expire=cache_expire)

def render_text(template_name, cache_key=None, cache_type=None,
                   cache_expire=None):
     """Render a text template with z3c.pt."""

     def render_template():
         globs = pylons_globals()
         template = globs["app_globals"].pt_loader.load(template_name,
format="text")
         return template(**globs)

     return cached_template(template_name, render_template,
cache_key=cache_key,
             cache_type=cache_type, cache_expire=cache_expire)

you can then use render_pt to render html/xml templates, and render_text
to render text templates, exactly like you use other templating languages.

Wichert.

--
Wichert Akkerman <wich...@wiggy.net>   It is simple to make things.
http://www.wiggy.net/                  It is hard to make things simple.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Iain Duncan  
View profile   Translate to Translated (View Original)
 More options 19 Sep, 21:16
From: Iain Duncan <iaindun...@telus.net>
Date: Sat, 19 Sep 2009 13:16:21 -0700
Local: Sat 19 Sep 2009 21:16
Subject: Re: pylons with chameleon?
Wichert, thank you so much for your explicit example! I'll try that out
this week. =)

Iain


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ubunoon  
View profile   Translate to Translated (View Original)
 More options 21 Sep, 15:43
From: ubunoon <net...@gmail.com>
Date: Mon, 21 Sep 2009 22:43:13 +0800
Local: Mon 21 Sep 2009 15:43
Subject: Re: pylons with chameleon?

create a template object, which attach to app_globals in
config/envrionment.py, then
create a render function, using pylons_globals() and cached_template()
functions,
all after,  add it to app_globals to render the template by using template
lookup method.

2009/9/20 Iain Duncan <iaindun...@telus.net>

--
To be pythoner
My blog: http://www.cnblogs.com/ubunoon/

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Iain Duncan  
View profile   Translate to Translated (View Original)
 More options 24 Sep, 06:53
From: Iain Duncan <iaindun...@telus.net>
Date: Wed, 23 Sep 2009 22:53:53 -0700
Local: Thurs 24 Sep 2009 06:53
Subject: Re: pylons with chameleon?
In Sat, 2009-09-19 at 09:40 +0200, Wichert Akkerman wrote:

> On 2009-9-16 21:06, Iain Duncan wrote:

> > Hi folks, I have not built enough pylons to be know how to switch
> > templating languages beyond mako and genshi, but I'm interested in using
> > Chameleon. Has anyone got any examples up of what one needs to do to use
> > Chameleon?

Thanks Wichert, I've hit some problems here, and muddled along a bit, if
you ( or someone ) can check this that would be great.

> In config/environment.py:

> from genshi.template import TemplateLoader as GenshiTemplateLoader

I assume I'm also supposed to add??

from chameleon.zpt.loader import TemplateLoader

I copied the above in, and imported render_pt from lib/pt.py, but when I
try to render a template like so:

(in a controller)
  def zpt(self):
        "test of using zpt templates"
        return render_pt("mytemplate.pt")

I get the following traceback, any help much appreciated.

File '/home/ymh/pylons_full/pylons_full/controllers/peek.py', line 50 in
zpt

File '/home/ymh/pylons_full/pylons_full/lib/pt.py', line 15 in render_pt
  cache_key=cache_key, cache_type=cache_type, cache_expire=cache_expire)
File
'/home/ymh/lib/python2.5/site-packages/Pylons-0.9.7-py2.5.egg/pylons/templa ting.py', line 249 in cached_template
  return render_func()
File '/home/ymh/pylons_full/pylons_full/lib/pt.py', line 11 in
render_template
  template = globs["app_globals"].pt_loader.load(template_name)
File
'/home/ymh/lib/python2.5/site-packages/chameleon.zpt-1.0.0-py2.5.egg/chamel eon/zpt/loader.py', line 11 in load
  template.PageTemplateFile)
File
'/home/ymh/lib/python2.5/site-packages/chameleon.core-1.0.0-py2.5.egg/chame leon/core/loader.py', line 8 in load
  self.registry[args] = template = func(self, *args)
File
'/home/ymh/lib/python2.5/site-packages/chameleon.core-1.0.0-py2.5.egg/chame leon/core/loader.py', line 39 in load
  path, self.parser, auto_reload=self.auto_reload)
TypeError: __init__() takes exactly 2 non-keyword arguments (3 given)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wichert Akkerman  
View profile   Translate to Translated (View Original)
 More options 24 Sep, 08:42
From: Wichert Akkerman <wich...@wiggy.net>
Date: Thu, 24 Sep 2009 09:42:08 +0200
Local: Thurs 24 Sep 2009 08:42
Subject: Re: pylons with chameleon?
On 2009-9-24 07:53, Iain Duncan wrote:

Doh, that line should have read:

   from chameleon.genshi.loader import TemplateLoader

> I assume I'm also supposed to add??

> from chameleon.zpt.loader import TemplateLoader

That depends. Personally I use chameleon.genshi since I prefer Genshi
syntax over zpt. If you want to use the Zope page template syntax you'll
want to replace chameleon.zpt.

Hm, the chameleon.zpt template has not seen as much love as the
chameleon.genshi version so it might have broken somewhere. Can you test
if chameleon.genshi works for you? If so I'll look at fixing up the
chameleon.zpt version.

Wichert.

--
Wichert Akkerman <wich...@wiggy.net>   It is simple to make things.
http://www.wiggy.net/                  It is hard to make things simple.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wichert Akkerman  
View profile   Translate to Translated (View Original)
 More options 24 Sep, 08:51
From: Wichert Akkerman <wich...@wiggy.net>
Date: Thu, 24 Sep 2009 09:51:15 +0200
Local: Thurs 24 Sep 2009 08:51
Subject: Re: pylons with chameleon?
On 2009-9-24 07:53, Iain Duncan wrote:

I think I fixed that in chameleon.zpt. Can you try the current svn trunk
(see http://svn.repoze.org/chameleon.zpt/trunk ) and let me know if that
works for you?

Wichert.

--
Wichert Akkerman <wich...@wiggy.net>   It is simple to make things.
http://www.wiggy.net/                  It is hard to make things simple.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Orr  
View profile   Translate to Translated (View Original)
 More options 24 Sep, 14:41
From: Mike Orr <sluggos...@gmail.com>
Date: Thu, 24 Sep 2009 06:41:38 -0700
Local: Thurs 24 Sep 2009 14:41
Subject: Re: pylons with chameleon?

On Wed, Sep 16, 2009 at 12:06 PM, Iain Duncan <iaindun...@telus.net> wrote:

> Hi folks, I have not built enough pylons to be know how to switch
> templating languages beyond mako and genshi, but I'm interested in using
> Chameleon. Has anyone got any examples up of what one needs to do to use
> Chameleon?

What is Chameleon anyway?  I googled and found this
http://www.interfaceware.com/manual/chameleon.html
"Welcome to Chameleon, an intuitive and easy-to-use software tool for
adding industry-standard message capabilities to new or existing
healthcare applications."

Is this the Chameleon you're talking about?

--
Mike Orr <sluggos...@gmail.com>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
KMCB  
View profile   Translate to Translated (View Original)
 More options 24 Sep, 17:03
From: KMCB <kmcbrea...@yahoo.com>
Date: Thu, 24 Sep 2009 09:03:19 -0700 (PDT)
Local: Thurs 24 Sep 2009 17:03
Subject: Re: pylons with chameleon?
Mike,

I think they may be talk about this

http://chameleon.repoze.org/

Regards,
         KMCB

On Sep 24, 9:41 am, Mike Orr <sluggos...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wichert Akkerman  
View profile   Translate to Translated (View Original)
 More options 24 Sep, 17:14
From: Wichert Akkerman <wich...@wiggy.net>
Date: Thu, 24 Sep 2009 18:14:56 +0200
Local: Thurs 24 Sep 2009 17:14
Subject: Re: pylons with chameleon?
On 2009-9-24 18:03, KMCB wrote:

> Mike,

> I think they may be talk about this

> http://chameleon.repoze.org/

That's the one.

Wichert.

--
Wichert Akkerman <wich...@wiggy.net>   It is simple to make things.
http://www.wiggy.net/                  It is hard to make things simple.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Orr  
View profile   Translate to Translated (View Original)
 More options 24 Sep, 18:16
From: Mike Orr <sluggos...@gmail.com>
Date: Thu, 24 Sep 2009 10:16:52 -0700
Local: Thurs 24 Sep 2009 18:16
Subject: Re: pylons with chameleon?

On Thu, Sep 24, 2009 at 9:03 AM, KMCB <kmcbrea...@yahoo.com> wrote:

> Mike,

> I think they may be talk about this

> http://chameleon.repoze.org/

So it's a template engine unifier, the way Buffet was and render_*
are.  It also claims to be faster than the native engines ported to
it?

--
Mike Orr <sluggos...@gmail.com>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Iain Duncan  
View profile   Translate to Translated (View Original)
 More options 24 Sep, 19:21
From: Iain Duncan <iaindun...@telus.net>
Date: Thu, 24 Sep 2009 11:21:08 -0700
Local: Thurs 24 Sep 2009 19:21
Subject: Re: pylons with chameleon?

On Thu, 2009-09-24 at 10:16 -0700, Mike Orr wrote:
> On Thu, Sep 24, 2009 at 9:03 AM, KMCB <kmcbrea...@yahoo.com> wrote:

> > Mike,

> > I think they may be talk about this

> > http://chameleon.repoze.org/

> So it's a template engine unifier, the way Buffet was and render_*
> are.  It also claims to be faster than the native engines ported to
> it?

Yes, it compiles both genshi and zpt templates to bytecode. That's about
all I know! chameleon.zpt is the out-of-the-box template standard for
repoze.bfg apps

Iain


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wichert Akkerman  
View profile   Translate to Translated (View Original)
 More options 25 Sep, 09:00
From: Wichert Akkerman <wich...@wiggy.net>
Date: Fri, 25 Sep 2009 10:00:17 +0200
Local: Fri 25 Sep 2009 09:00
Subject: Re: pylons with chameleon?
On 2009-9-24 19:16, Mike Orr wrote:

> On Thu, Sep 24, 2009 at 9:03 AM, KMCB<kmcbrea...@yahoo.com>  wrote:

>> Mike,

>> I think they may be talk about this

>> http://chameleon.repoze.org/

> So it's a template engine unifier, the way Buffet was and render_*
> are.  It also claims to be faster than the native engines ported to
> it?

If I remember correctly Buffet was a wrapper around template engines,
which provided a common API for rendering templates. Chameleon is
something different: it is a template rendering engine with frontends
for handling Zope page templates and Genshi syntax. You could compare it
to gcc with its different frontends for C, C++, Fortran, etc. It is a
lot faster than the original implementations. From what I remember it is
about 10-14 times faster than the original implementations for both with
the bigtable benchmark, which puts it in the same ballpark as Mako.

Wichert.

--
Wichert Akkerman <wich...@wiggy.net>   It is simple to make things.
http://www.wiggy.net/                  It is hard to make things simple.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Iain Duncan  
View profile   Translate to Translated (View Original)
 More options 25 Sep, 21:55
From: Iain Duncan <iaindun...@telus.net>
Date: Fri, 25 Sep 2009 13:55:40 -0700
Local: Fri 25 Sep 2009 21:55
Subject: Re: pylons with chameleon?

> Hm, the chameleon.zpt template has not seen as much love as the
> chameleon.genshi version so it might have broken somewhere. Can you test
> if chameleon.genshi works for you? If so I'll look at fixing up the
> chameleon.zpt version.

Thanks, Chameleon genshi is working with your correction. Is the plan
for chameleon to eventually be able to support both genshi and tal
attributes at the same time or will it always be an either or?

I also like genshi syntax a lot, so I'm just happy to use a fast genshi,
but it seems like there are some nice extras in the tal world as well.

Thanks
Iain


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "pylons with chameleon? unescaping HTML" by Iain Duncan
Iain Duncan  
View profile   Translate to Translated (View Original)
 More options 25 Sep, 23:45
From: Iain Duncan <iaindun...@telus.net>
Date: Fri, 25 Sep 2009 15:45:58 -0700
Local: Fri 25 Sep 2009 23:45
Subject: Re: pylons with chameleon? unescaping HTML

> Hm, the chameleon.zpt template has not seen as much love as the
> chameleon.genshi version so it might have broken somewhere. Can you test
> if chameleon.genshi works for you? If so I'll look at fixing up the
> chameleon.zpt version.

I've got the genshi templates being rendered, but I don't seem to be
able to use HTML() or XML() to unescape html tags if the values being
injected into the template are xhtml. Can anyone tell me what I need to
do to display HTML properly within a genshi template rendered by
chameleon, or why the HMTL function is not available?

thanks
Iain


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wichert Akkerman  
View profile   Translate to Translated (View Original)
 More options 26 Sep, 15:09
From: Wichert Akkerman <wich...@wiggy.net>
Date: Sat, 26 Sep 2009 16:09:02 +0200
Local: Sat 26 Sep 2009 15:09
Subject: Re: pylons with chameleon? unescaping HTML
On 2009-9-26 00:45, Iain Duncan wrote:

>> Hm, the chameleon.zpt template has not seen as much love as the
>> chameleon.genshi version so it might have broken somewhere. Can you test
>> if chameleon.genshi works for you? If so I'll look at fixing up the
>> chameleon.zpt version.

> I've got the genshi templates being rendered, but I don't seem to be
> able to use HTML() or XML() to unescape html tags if the values being
> injected into the template are xhtml. Can anyone tell me what I need to
> do to display HTML properly within a genshi template rendered by
> chameleon, or why the HMTL function is not available?

Same system as Mako uses: it checks for a __html__ method. If you use
pylons that means you can use webhelpers.html.literal to indicate a
string should not be escaped. For example:

from webhelpers.html import literal

def my_func_in_lib_helpers():
     return literal(u"Hello, <em>world</em>!")

Wichert.

--
Wichert Akkerman <wich...@wiggy.net>   It is simple to make things.
http://www.wiggy.net/                  It is hard to make things simple.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "pylons with chameleon?" by Wichert Akkerman
Wichert Akkerman  
View profile   Translate to Translated (View Original)
 More options 26 Sep, 15:14
From: Wichert Akkerman <wich...@wiggy.net>
Date: Sat, 26 Sep 2009 16:14:28 +0200
Local: Sat 26 Sep 2009 15:14
Subject: Re: pylons with chameleon?
On 2009-9-25 22:55, Iain Duncan wrote:

>> Hm, the chameleon.zpt template has not seen as much love as the
>> chameleon.genshi version so it might have broken somewhere. Can you test
>> if chameleon.genshi works for you? If so I'll look at fixing up the
>> chameleon.zpt version.

> Thanks, Chameleon genshi is working with your correction. Is the plan
> for chameleon to eventually be able to support both genshi and tal
> attributes at the same time or will it always be an either or?

My correction was in chameleon.zpt. chameleon.genshi has always had a
working template loader.

As far as I know there are no plans to support both Genshi and Page
Template syntax in the same file, and I have to admit that I personally
do not see any real benefits to doing that. chameleon.zpt does go a
little bit beyond the official zpt standards though: it also supports
${...} expansions, similar to Genshi templates.

Wichert.

--
Wichert Akkerman <wich...@wiggy.net>   It is simple to make things.
http://www.wiggy.net/                  It is hard to make things simple.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas G. Willis  
View profile   Translate to Translated (View Original)
 More options 26 Sep, 20:10
From: "Thomas G. Willis" <tom.wil...@gmail.com>
Date: Sat, 26 Sep 2009 12:10:55 -0700 (PDT)
Local: Sat 26 Sep 2009 20:10
Subject: Re: pylons with chameleon?
On Sep 26, 10:14 am, Wichert Akkerman <wich...@wiggy.net> wrote:

I was just playing with this and it seems that the genshi syntax is
somewhat limited. Is that correct?

For example, including a site page just like this example from gensh
blows up.
http://genshi.edgewall.org/wiki/GenshiTutorial#AddingaLayoutTemplate

And even though I know it's not good practice to do the whole <?
python ?> thing, chameleon seems to blow up on this as well.

I don't know if I would call these bugs necessarily, but it would be
nice if there was something explicit stating that the syntax isn't
fully supported. Other than that, when it works, man is it fast.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wichert Akkerman  
View profile   Translate to Translated (View Original)
 More options 26 Sep, 20:26
From: Wichert Akkerman <wich...@wiggy.net>
Date: Sat, 26 Sep 2009 21:26:00 +0200
Subject: Re: pylons with chameleon?
On 2009-9-26 21:10, Thomas G. Willis wrote:

To be more precise: chameleon.genshi implements the Genshi XML template
syntax as described in
http://genshi.edgewall.org/wiki/Documentation/0.5.x/xml-templates.html .
<?python> is not a part of that syntax.

That tutorial does not work due to a limitation chameleon.genshi
currently has: match templates defined in included templates are not
applied to the calling document. That is documented at
http://pypi.python.org/pypi/chameleon.genshi. If enough people ask
Malthe if he can add support for that might be fixed :)

Wichert.

--
Wichert Akkerman <wich...@wiggy.net>   It is simple to make things.
http://www.wiggy.net/                  It is hard to make things simple.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas G. Willis  
View profile   Translate to Translated (View Original)
 More options 26 Sep, 20:38
From: "Thomas G. Willis" <tom.wil...@gmail.com>
Date: Sat, 26 Sep 2009 15:38:22 -0400
Local: Sat 26 Sep 2009 20:38
Subject: Re: pylons with chameleon?

Yes I saw that match templates are not applied, but for some reason I
was thinking that meant "are ignored" not "causes things to blow up".
So I wasn't sure whether other things were fuxored on my machine that
might be causing this.

But that's neither here nor there. I can work around these things if
it means "super fast templates" I was just curious about it. Thanks
for the clarification.

--
Thomas G. Willis


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Iain Duncan  
View profile   Translate to Translated (View Original)
 More options 30 Sep, 00:36
From: Iain Duncan <iaindun...@telus.net>
Date: Tue, 29 Sep 2009 16:36:12 -0700
Local: Wed 30 Sep 2009 00:36
Subject: Re: pylons with chameleon?

> To be more precise: chameleon.genshi implements the Genshi XML template
> syntax as described in
> http://genshi.edgewall.org/wiki/Documentation/0.5.x/xml-templates.html .
> <?python> is not a part of that syntax.

> That tutorial does not work due to a limitation chameleon.genshi
> currently has: match templates defined in included templates are not
> applied to the calling document. That is documented at
> http://pypi.python.org/pypi/chameleon.genshi. If enough people ask
> Malthe if he can add support for that might be fixed :)

Sorry if I'm being dumb here, but I'm confused by the above. Does this
mean that one can't use a master and derived templates setup with match
templates? That would seem to be a big limitation, but maybe I am doing
this wrong. Can you tell me how you handle template inheritance or
master templates with chameleon.genshi?

thanks
Iain


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas G. Willis  
View profile   Translate to Translated (View Original)
 More options 30 Sep, 00:50
From: "Thomas G. Willis" <tom.wil...@gmail.com>
Date: Tue, 29 Sep 2009 19:50:29 -0400
Local: Wed 30 Sep 2009 00:50
Subject: Re: pylons with chameleon?

That's what I took it to mean.

Another way to get the same effect is to use something like
deliverance or repoze.tempita which is why I wasn't too worried about
it.

http://svn.repoze.org/repoze.tempita/trunk/README.txt
http://www.coactivate.org/projects/deliverance/introduction

Though I'm wondering now whether the overhead of either of these 2
would eliminate any gains   from chameleon.genshi over straight genshi

--
Thomas G. Willis


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
adamhutton  
View profile   Translate to Translated (View Original)
 More options 29 Oct, 14:37
From: adamhutton <huttona.usn...@gmail.com>
Date: Thu, 29 Oct 2009 07:37:33 -0700 (PDT)
Local: Thurs 29 Oct 2009 14:37
Subject: Re: pylons with chameleon?
For anyone who finds this thread and is looking for these directions
in the context of a Pylons project (what to change where),
I put together a little tutorial/recipe showing what needs to be
changed in the Pylons' QuickWiki project
so it can use chameleon.zpt (there's a tutorial for building QuickWiki
with Mako templates on the Pylons website
that I'd recommend following first).

http://wiki.pylonshq.com/display/pylonscookbook/QuickWiki+with+chamel...

Adam


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
adamhutton  
View profile   Translate to Translated (View Original)
 More options 6 Nov, 14:34
From: adamhutton <huttona.usn...@gmail.com>
Date: Fri, 6 Nov 2009 06:34:50 -0800 (PST)
Local: Fri 6 Nov 2009 14:34
Subject: Re: pylons with chameleon?
Wiki page renamed/updated to reflect egg reorganization:

http://wiki.pylonshq.com/display/pylonscookbook/QuickWiki+with+Chameleon


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google