On 1/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>     >> Aside from changing ".myt" to ".mak" do I need to do anything else?
>     >> Is there a Mako replacement for myghty.exception?
>
>     Max> I should configure Mako as a supported template engine.
>
> Oh, yeah, been there, done that, checked out both of those pages as well.  I
> was specifically curious about the import of myghty.exception in my
> controllers/template.py module.  Is myghty.exception.ComponentNotFound still
> raised when render_response fails even if the default template engine isn't
> Myghty?  It turns out it isn't.  It appears that mako raises
> mako.exceptions.TopLevelLookupException.  It would be kind of nice if Pylons
> mapped the various template engine-specific exceptions to something in the
> Pylons namespace so that this code didn't have to change or get all baroque
> if you wanted to use different template engines.

Maybe I'm wrong, but would something like this work:

class TemplateNotFound(myghty.exception.ComponentNotFound,

mako.exceptions.TopLevelLookupException):
    pass

...
except TemplateNotFound:
    ....

?
-jj

-- 
http://jjinux.blogspot.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to