Can someone who has worked with template pluging review this doc

View: New views
13 Messages — Rating Filter:   Alert me  

Can someone who has worked with template pluging review this doc

by Sebastian Ware :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Paul has updated the following document:

   http://grok.zope.org/documentation/how-to/plugging-in-new-template-languages

Could someone who has worked with pluging in templates take a look at  
it.

Mvh Sebastian



_______________________________________________
Grok-dev mailing list
Grok-dev@...
https://mail.zope.org/mailman/listinfo/grok-dev

Re: Can someone who has worked with template pluging review this doc

by Uli Fouquet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sebastian Ware wrote:
> Paul has updated the following document:
>
>    http://grok.zope.org/documentation/how-to/plugging-in-new-template-languages


Thanks Paul! Great!

> Could someone who has worked with pluging in templates take a look at  
> it.

If that's okay I could extend the HowTo a bit by giving a simple
template engine example and tell more about namespaces in templates.

Best regards,

--
Uli



_______________________________________________
Grok-dev mailing list
Grok-dev@...
https://mail.zope.org/mailman/listinfo/grok-dev

signature.asc (196 bytes) Download Attachment

Re: Can someone who has worked with template pluging review this doc

by PAW :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/9/23 Uli Fouquet <uli@...>:
> Sebastian Ware wrote:
> If that's okay I could extend the HowTo a bit by giving a simple
> template engine example and tell more about namespaces in templates.

Sounds good! The fact that MyTemplate is not defined anywhere is
confusing (see the comment on the HowTo) so I think that would be a
good idea.

Regards,
Paul
_______________________________________________
Grok-dev mailing list
Grok-dev@...
https://mail.zope.org/mailman/listinfo/grok-dev

Re: Can someone who has worked with template pluging review this doc

by Santiago Videla :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I think that it's important to note that when the new templates language it's placed in a separated egg (megrok.chamaleon, megrok.genshi, megrok.jinja) you must ensure that this package gets grokked before anything else
(using <include package="megrok.mytemplate" /> in the application configure.zcml).

Otherwise, Grok could not recognize the new templates extension.

Maybe, you may want to include link references to the existing packages:

http://pypi.python.org/pypi/megrok.chameleon/0.2
http://pypi.python.org/pypi/megrok.genshi/1.0
http://pypi.python.org/pypi/megrok.jinja/0.1

Best Regards


On Wed, Sep 23, 2009 at 9:18 AM, Paul Wilson <paulalexwilson@...> wrote:
2009/9/23 Uli Fouquet <uli@...>:
> Sebastian Ware wrote:
> If that's okay I could extend the HowTo a bit by giving a simple
> template engine example and tell more about namespaces in templates.

Sounds good! The fact that MyTemplate is not defined anywhere is
confusing (see the comment on the HowTo) so I think that would be a
good idea.

Regards,
Paul
_______________________________________________
Grok-dev mailing list
Grok-dev@...
https://mail.zope.org/mailman/listinfo/grok-dev



--
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@s tod@s somos.

_______________________________________________
Grok-dev mailing list
Grok-dev@...
https://mail.zope.org/mailman/listinfo/grok-dev

Re: Can someone who has worked with template pluging review this doc

by Uli Fouquet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi there,

Am Mittwoch, den 23.09.2009, 09:41 -0300 schrieb Santiago Videla:

> I think that it's important to note that when the new templates
> language it's placed in a separated egg (megrok.chamaleon,
> megrok.genshi, megrok.jinja) you must ensure that this package gets
> grokked before anything else
> (using <include package="megrok.mytemplate" /> in the application
> configure.zcml).

Uh, really? Shouldn't <includeDependencies package="." /> do this job?

> Otherwise, Grok could not recognize the new templates extension.
>
> Maybe, you may want to include link references to the existing
> packages:
>
> http://pypi.python.org/pypi/megrok.chameleon/0.2
> http://pypi.python.org/pypi/megrok.genshi/1.0
> http://pypi.python.org/pypi/megrok.jinja/0.1

Thanks for the links! I added these and did some minor updates on the
orginal howto. Maybe someone with better skills in English can
proofread?

Best regards,

--
Uli



_______________________________________________
Grok-dev mailing list
Grok-dev@...
https://mail.zope.org/mailman/listinfo/grok-dev

signature.asc (196 bytes) Download Attachment

Re: Can someone who has worked with template pluging review this doc

by PAW :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/9/23 Uli Fouquet <uli@...>:

> Hi there,
>
> Am Mittwoch, den 23.09.2009, 09:41 -0300 schrieb Santiago Videla:
>
>> I think that it's important to note that when the new templates
>> language it's placed in a separated egg (megrok.chamaleon,
>> megrok.genshi, megrok.jinja) you must ensure that this package gets
>> grokked before anything else
>> (using <include package="megrok.mytemplate" /> in the application
>> configure.zcml).
>
> Uh, really? Shouldn't <includeDependencies package="." /> do this job?

I agree(d):

https://mail.zope.org/pipermail/grok-dev/2009-February/007336.html

Thanks,
Paul
_______________________________________________
Grok-dev mailing list
Grok-dev@...
https://mail.zope.org/mailman/listinfo/grok-dev

Re: Can someone who has worked with template pluging review this doc

by Uli Fouquet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi there,

Paul Wilson wrote:

> 2009/9/23 Uli Fouquet <uli@...>:
> > Hi there,
> >
> > Am Mittwoch, den 23.09.2009, 09:41 -0300 schrieb Santiago Videla:
> >
> >> I think that it's important to note that when the new templates
> >> language it's placed in a separated egg (megrok.chamaleon,
> >> megrok.genshi, megrok.jinja) you must ensure that this package gets
> >> grokked before anything else
> >> (using <include package="megrok.mytemplate" /> in the application
> >> configure.zcml).
> >
> > Uh, really? Shouldn't <includeDependencies package="." /> do this job?
>
> I agree(d):
>
> https://mail.zope.org/pipermail/grok-dev/2009-February/007336.html
I remember this thread. We didn't come to a conclusion, did we?

Just tried the includeDependencies approach now with megrok.chameleon
and it worked nicely. Hm, I included hints to this problem in the howto
but I would prefer if we could remove it, as it might confuse readers.
Installing packages is not the main target of the howto and there are
also setup infos on the linked pypi pages.

Testing megrok.genshi was not possible as it looks like this package is
outdated and does not work with current grok:

--------------------%<----------------
File
"/home/.../eggs/megrok.genshi-1.0-py2.5.egg/megrok/genshi/components.py", line 45, in GenshiMarkupTemplateFactory
    zope.interface.implements(grok.interfaces.ITemplateFileFactory)
...
    AttributeError: 'module' object has no attribute
'ITemplateFileFactory'
--------------------%<----------------

AFAICS ITemplateFileFactory was removed from grok.interfaces (moved to
grokcore.view.interfaces, right?) in december 2008. Time for an update?

Best regards,

--
Uli



_______________________________________________
Grok-dev mailing list
Grok-dev@...
https://mail.zope.org/mailman/listinfo/grok-dev

signature.asc (196 bytes) Download Attachment

Re: Can someone who has worked with template pluging review this doc

by PAW :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/9/23 Uli Fouquet <uli@...>:

> Hi there,
>
> Paul Wilson wrote:
>
>> 2009/9/23 Uli Fouquet <uli@...>:
>> > Hi there,
>> >
>> > Am Mittwoch, den 23.09.2009, 09:41 -0300 schrieb Santiago Videla:
>> >
>> >> I think that it's important to note that when the new templates
>> >> language it's placed in a separated egg (megrok.chamaleon,
>> >> megrok.genshi, megrok.jinja) you must ensure that this package gets
>> >> grokked before anything else
>> >> (using <include package="megrok.mytemplate" /> in the application
>> >> configure.zcml).
>> >
>> > Uh, really? Shouldn't <includeDependencies package="." /> do this job?
>>
>> I agree(d):
>>
>> https://mail.zope.org/pipermail/grok-dev/2009-February/007336.html
>
> I remember this thread. We didn't come to a conclusion, did we?

I personally never got to the bottom of it.

> Just tried the includeDependencies approach now with megrok.chameleon
> and it worked nicely. Hm, I included hints to this problem in the howto
> but I would prefer if we could remove it, as it might confuse readers.
> Installing packages is not the main target of the howto and there are
> also setup infos on the linked pypi pages.
>
> Testing megrok.genshi was not possible as it looks like this package is
> outdated and does not work with current grok:
>
> --------------------%<----------------
> File
> "/home/.../eggs/megrok.genshi-1.0-py2.5.egg/megrok/genshi/components.py", line 45, in GenshiMarkupTemplateFactory
>    zope.interface.implements(grok.interfaces.ITemplateFileFactory)
> ...
>    AttributeError: 'module' object has no attribute
> 'ITemplateFileFactory'
> --------------------%<----------------
>
> AFAICS ITemplateFileFactory was removed from grok.interfaces (moved to
> grokcore.view.interfaces, right?) in december 2008. Time for an update?

Yes it was:

http://svn.zope.org/megrok.genshi/trunk/src/megrok/genshi/components.py?rev=101531&view=markup

In fact, that's exactly the change I made to the documentation
mentioned at the beginning of this thread.

Regards,
Paul
_______________________________________________
Grok-dev mailing list
Grok-dev@...
https://mail.zope.org/mailman/listinfo/grok-dev

Re: Can someone who has worked with template pluging review this doc

by Uli Fouquet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi there,

Paul Wilson wrote:

> 2009/9/23 Uli Fouquet <uli@...>:
[snip]

> >
> > Testing megrok.genshi was not possible as it looks like this package is
> > outdated and does not work with current grok:
> >
> > --------------------%<----------------
> > File
> > "/home/.../eggs/megrok.genshi-1.0-py2.5.egg/megrok/genshi/components.py", line 45, in GenshiMarkupTemplateFactory
> >    zope.interface.implements(grok.interfaces.ITemplateFileFactory)
> > ...
> >    AttributeError: 'module' object has no attribute
> > 'ITemplateFileFactory'
> > --------------------%<----------------
> >
> > AFAICS ITemplateFileFactory was removed from grok.interfaces (moved to
> > grokcore.view.interfaces, right?) in december 2008. Time for an update?
>
> Yes it was:
>
> http://svn.zope.org/megrok.genshi/trunk/src/megrok/genshi/components.py?rev=101531&view=markup
>
> In fact, that's exactly the change I made to the documentation
> mentioned at the beginning of this thread.
megrok.genshi was fixed by Kevin Gill months ago and tests pass also for
Grok 1.0b2. All we need is a new release. Lennart, could you do that?

Many thanks in advance,

--
Uli



_______________________________________________
Grok-dev mailing list
Grok-dev@...
https://mail.zope.org/mailman/listinfo/grok-dev

signature.asc (196 bytes) Download Attachment

Re: Can someone who has worked with template pluging review this doc

by PAW :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/9/23 Uli Fouquet <uli@...>:

> Hi there,
>
> Paul Wilson wrote:
>
>> 2009/9/23 Uli Fouquet <uli@...>:
> [snip]
>> >
>> > Testing megrok.genshi was not possible as it looks like this package is
>> > outdated and does not work with current grok:
>> >
>> > --------------------%<----------------
>> > File
>> > "/home/.../eggs/megrok.genshi-1.0-py2.5.egg/megrok/genshi/components.py", line 45, in GenshiMarkupTemplateFactory
>> >    zope.interface.implements(grok.interfaces.ITemplateFileFactory)
>> > ...
>> >    AttributeError: 'module' object has no attribute
>> > 'ITemplateFileFactory'
>> > --------------------%<----------------
>> >
>> > AFAICS ITemplateFileFactory was removed from grok.interfaces (moved to
>> > grokcore.view.interfaces, right?) in december 2008. Time for an update?
>>
>> Yes it was:
>>
>> http://svn.zope.org/megrok.genshi/trunk/src/megrok/genshi/components.py?rev=101531&view=markup
>>
>> In fact, that's exactly the change I made to the documentation
>> mentioned at the beginning of this thread.
>
> megrok.genshi was fixed by Kevin Gill months ago and tests pass also for
> Grok 1.0b2. All we need is a new release. Lennart, could you do that?

While we're at it, is it advantageous for it to get its GlobalUtility
from grokcore.component too?

Thanks,
Paul
_______________________________________________
Grok-dev mailing list
Grok-dev@...
https://mail.zope.org/mailman/listinfo/grok-dev

Re: Can someone who has worked with template pluging review this doc

by PAW :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/9/23 Uli Fouquet <uli@...>:
> Thanks for the links! I added these and did some minor updates on the
> orginal howto. Maybe someone with better skills in English can
> proofread?

I've had a read through it and made a very small amendment; the
English is fine! Good work! I think the change obsoletes the comment
at the bottom of the page now too, should we remove it?

Thanks,
Paul
_______________________________________________
Grok-dev mailing list
Grok-dev@...
https://mail.zope.org/mailman/listinfo/grok-dev

Re: Can someone who has worked with template pluging review this doc

by Uli Fouquet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Paul,

Paul Wilson wrote:
> 2009/9/23 Uli Fouquet <uli@...>:

[snip]

> >> > AFAICS ITemplateFileFactory was removed from grok.interfaces (moved to
> >> > grokcore.view.interfaces, right?) in december 2008. Time for an update?
> >>

[snip]

> > megrok.genshi was fixed by Kevin Gill months ago and tests pass also for
> > Grok 1.0b2. All we need is a new release. Lennart, could you do that?
>
> While we're at it, is it advantageous for it to get its GlobalUtility
> from grokcore.component too?

Good hint! Yes, that would indeed be nice. Sylvain managed to decouple
megrok.chameleon from grok (leaving grokcore.* dependencies). From what
I've seen that should be possible for megrok.genshi to :-)

But also a working grok-based megrok.genshi release would be nice in
order to avoid disappointed developers.

Best regards,

--
Uli



_______________________________________________
Grok-dev mailing list
Grok-dev@...
https://mail.zope.org/mailman/listinfo/grok-dev

signature.asc (196 bytes) Download Attachment

Re: Can someone who has worked with template pluging review this doc

by Uli Fouquet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Paul,

Paul Wilson wrote:

> 2009/9/23 Uli Fouquet <uli@...>:
> > Thanks for the links! I added these and did some minor updates on the
> > orginal howto. Maybe someone with better skills in English can
> > proofread?
>
> I've had a read through it and made a very small amendment; the
> English is fine! Good work! I think the change obsoletes the comment
> at the bottom of the page now too, should we remove it?

Thanks a lot, Paul! That was quick :-)

Yeah, I also think we can remove the comment now.

Best regards,

--
Uli



_______________________________________________
Grok-dev mailing list
Grok-dev@...
https://mail.zope.org/mailman/listinfo/grok-dev

signature.asc (196 bytes) Download Attachment