[Zope-dev] z3c:pagelet with template attribute error

2008-03-13 Thread Gaël Pasgrimaud
Hello,

the z3c:pagelet directive have a strange behavior when you provide a
template attribute. The template path is not resolved like in standard
browser:page so when you try to call your pagelet you get a unicode
is not callable error.

I know that the way to associate a template to a pagelet is to use a
z3c:template or a class attribute but this behavior can make a lot of
people confused.

So I see two options:

- resolve the template path in the directive and give a real
ViewPageTemplateFile to the class like in browser:page

- raising a ConfigurationError if a template key is found in **kwargs
if you want to force the use of z3c:template.

I like the first one because you don't always need a z3c:template and
writing template=sample.pt is shorter than from ... import
ViewpageTemplateFile; template = ViewPageTemplateFile('sample.pt').
May be i can give a patch for this. Let me know.

Regards,

--
Gael
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Zope 3 without ZODB

2008-02-15 Thread Gaël Pasgrimaud
2008/2/15, Jim Washington [EMAIL PROTECTED]:
 Kapil Thangavelu wrote:
   try ore.wsgiapp in pypi, you provide a root utility and traversal
   begins from there, the zodb is never opened. the default publication
   looks up the app root via utility and traversal continues from there.
   i've been using it successfully for a number of relational apps
   without the zodb.

 Thanks, Kapil.

  I spent a day on it, and never got past error pages.  Maybe my problem
  was starting with a zopeproject.

  Anyway, it got me to take a good look at pylons, which I think is a
  better match for web development without ZODB.

  I found I can still use adapters and utilities by using zope.component
  and zope.interface. :)


Anyone know if there is any chance to use existing zcml declarations
for this use case ?
Is it possible to load a site.zcml in other python apps ?

I'm using pylons too and i really like to use some zope.* packages
with it (events, formlib, etc.).
Doing this kind of things will show the power of zope3 packages to the world !

  zif.sedna (newly beta2 in pypi) now has instructions for using its zope3
  database adapter with repoze.tm in pylons.


  - Jim Washington

 ___
  Zope-Dev maillist  -  Zope-Dev@zope.org
  http://mail.zope.org/mailman/listinfo/zope-dev
  **  No cross posts or HTML encoding!  **
  (Related lists -
   http://mail.zope.org/mailman/listinfo/zope-announce
   http://mail.zope.org/mailman/listinfo/zope )

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )