[Grok-dev] About plugged templates... bug or coming soon feature??

Santiago Videla santiago.videla at gmail.com
Mon Dec 1 13:03:25 EST 2008


Hi,

As I said a few days ago, I'm working with Jinja2 as my template engine.

I have my grok app, created with grokproject, and some separated eggs in
development. Some of that eggs contains grok.View classes usging Jinja
templates

mainApp
      app.py
      app_templates
      ...
egg.development/
      src/
          egg/
            development/
                 views.py
                 views_templates/
                       someview.jinja
                       another.pt

The problem (bug?) that I found was that it seems that when the Views (using
Jinja templates) are grokked it doesn't found the Jinja templates for that
Views. It works fine with views using ZopePageTemplates

The error log says:

zope.configuration.config.ConfigurationExecutionError: <class
'martian.error.GrokError'>: View <class 'egg.development.views.SomeView'>
has no associated template or 'render' method.


To make it work, I must do

class SomeView(grok.View):
         ....
         ....
someview = JinjaTemplate('path/to/someview.jinja')


Am I doing anything wrong??

Regards,

-- 
Santiago Videla
www.revolucionesweb.com.ar
http://www.linkedin.com/in/svidela

Sigue la mata dando de que hablar siempre abajo y a la izquierda donde el
pensamiento que se hace corazón resplandece con la palabra sencilla y
humilde que l at s tod at s somos.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/grok-dev/attachments/20081201/0bd3604a/attachment.html 


More information about the Grok-dev mailing list