<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.web.zope.grok.devel">
    <title>gmane.comp.web.zope.grok.devel</title>
    <link>http://blog.gmane.org/gmane.comp.web.zope.grok.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11513"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11512"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11511"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11510"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11509"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11508"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11507"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11506"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11505"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11504"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11503"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11502"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11501"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11500"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11499"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11498"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11497"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11496"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11495"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11494"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11513">
    <title>Re: zope.app.file/zope.file buildout error</title>
    <link>http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11513</link>
    <description>&lt;pre&gt;Mauro, this was a very boring situation I had to handle some time ago.

After a long time I came up with this solution: include the snippet below before &amp;lt;grok:grok package="." /&amp;gt; in your configure.zcml. Soon you will learn that this way of handling files is not the best. I'm temporarily using an ancient version of dolmen.file (when it still depended on z3c.form). When the need comes, I'll probably have to write a package of my own since it seems people out there don't share this issue nor do they regarding a good solution.


&amp;lt;!-- zope.file requirements --&amp;gt;
  &amp;lt;include package="zope.browsermenu" file="meta.zcml" /&amp;gt;
  &amp;lt;include package="zope.browsermenu" /&amp;gt;
  &amp;lt;browser:menu id="zmi_views" title="ZMI Views" /&amp;gt;
  &amp;lt;browser:menu id="zmi_actions" title="ZMI Actions" /&amp;gt;




________________________________
---------------------------------------------------------------------

Message: 1
Date: Tue, 22 May 2012 17:48:54 +0200
From: Mauro Boschi &amp;lt;me&amp;lt; at &amp;gt;monadic.org&amp;gt;
To: grok-dev&amp;lt; at &amp;gt;zope.org
Subject: [Grok-dev] zope.app.file/zope.file buildout error
Message-ID: &amp;lt;CEA836D2-D16C-4185-B1D9-DD649514BCCE&amp;lt; at &amp;gt;monadic.org&amp;gt;
Content-Type: text/plain; charset="us-ascii"

Hi,
I've tried to run Music Tutorial but it doesn't work in song.py section ( http://grok.zope.org/documentation/tutorial/musical-performance-organizer-part-1 ). So I've tried zope.file how-to: http://grok.zope.org/documentation/how-to/uploading-file but it doesn't work too! :(

with a new grokproject test

I've added in buildout.cfg:
    [zope_conf]
    recipe = collective.recipe.template
    input = etc/zope.conf.in
    output = ${buildout:parts-directory}/etc/zope.conf
    filestorage = ${buildout:directory}/var/filestorage
    blobstorage = ${buildout:directory}/var/blobstorage
    devmode = on
    extra =

#I've added the devmode line to resolve another error.

Then I've added in setup.py:
      install_requires=['setuptools',
                        'grok',
                        'grokui.admin',
                        'fanstatic',
                        'zope.fanstatic',
                        'grokcore.chameleon',
                        'grokcore.startup',
                        # Add extra requirements here
                        'zope.file',
                        'zope.mimetype',
                        ],

bin/buildout run without errors but when grok startup: 

bin/paster serve --reload parts/etc/debug.ini

It raises this error:
ConfigurationError: ('Invalid value for', 'menu', "ImportError: Couldn't import zmi_views, No module named zmi_views")
---
Complete output there: http://pastebin.com/4ttSuCYp


I've tried with zope.app.file part from the same how-to but it raises a different error:
File "/usr/lib/python2.7/email/mime/image.py", line 9, in &amp;lt;module&amp;gt;
    import imghdr
RuntimeError: sys.path must be a list of directory names
---
Complete output there: http://pastebin.com/ysH1VRA7

Thanks!
Mauro
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: &amp;lt;http://mail.zope.org/pipermail/grok-dev/attachments/20120522/f4148505/attachment-0001.sig&amp;gt;

------------------------------_______________________________________________
Grok-dev mailing list
Grok-dev&amp;lt; at &amp;gt;zope.org
https://mail.zope.org/mailman/listinfo/grok-dev
&lt;/pre&gt;</description>
    <dc:creator>Danilo G B</dc:creator>
    <dc:date>2012-05-23T12:39:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11512">
    <title>Re: zope.app.file/zope.file buildout error</title>
    <link>http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11512</link>
    <description>&lt;pre&gt;Hi Mauro,

On Tue, 22 May 2012 17:48:54 +0200 Mauro Boschi wrote:


This one is because of zope.file trying to register menus for the ZMI
(Zope Management Interface). As the ZMI is gone from Grok (since v1.2, I
think) along with a huge pile of dependencies, you get this error.

To 'solve' it temporarily, i.e. to start the tutorial, you can switch
back to an older Grok version by modfiying buildout.cfg:

  [buildout]
  #extends = http://grok.zope.org/releaseinfo/1.5.4/versions.cfg
  # Use grok toolkit version 1.1
  extends = http://grok.zope.org/releaseinfo/1.1/versions.cfg

With current grokprojects this won't be enough as newer grokprojects
would require some new packages that did not exist at time of 1.1
release. You therefore have to pin some versions also in buildout.cfg:

  [versions]
  # Override versions here.
  zc.recipe.egg = 1.3.0
  zc.buildout = 1.5.0
  zope.fanstatic = 0.9
  megrok.layout = 1.0.1
  grokcore.startup = 1.0.2

helped here. After rerunning bin/buildout (maybe also python
bootstrap.py) you might be able to start the Zope instance again.

If you get some strange AttributeError while trying to restore an index:
remove all the Data.* files in var/filestorage/ and retry. This will, of
course, destroy all data already stored in the ZODB. So it's only an
option if you're evaluating and testing around.

This, however, is a workaround.

I think that zope.file shouldn't require ZMI-related registrations and
that it should be fixed. What do others think?



Looks like a similar problem with zope.app stuff, but I cannot really
say something useful concerning this.

Best regards,

&lt;/pre&gt;</description>
    <dc:creator>Uli Fouquet</dc:creator>
    <dc:date>2012-05-22T23:13:20</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11511">
    <title>zope.app.file/zope.file buildout error</title>
    <link>http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11511</link>
    <description>&lt;pre&gt;Hi,
I've tried to run Music Tutorial but it doesn't work in song.py section ( http://grok.zope.org/documentation/tutorial/musical-performance-organizer-part-1 ). So I've tried zope.file how-to: http://grok.zope.org/documentation/how-to/uploading-file but it doesn't work too! :(

with a new grokproject test

I've added in buildout.cfg:
[zope_conf]
recipe = collective.recipe.template
input = etc/zope.conf.in
output = ${buildout:parts-directory}/etc/zope.conf
filestorage = ${buildout:directory}/var/filestorage
blobstorage = ${buildout:directory}/var/blobstorage
devmode = on
extra =

#I've added the devmode line to resolve another error.

Then I've added in setup.py:
      install_requires=['setuptools',
                        'grok',
                        'grokui.admin',
                        'fanstatic',
                        'zope.fanstatic',
                        'grokcore.chameleon',
                        'grokcore.startup',
                        # Add extra requirements here
                        'zope.file',
                        'zope.mimetype',
                        ],

bin/buildout run without errors but when grok startup: 

bin/paster serve --reload parts/etc/debug.ini

It raises this error:
ConfigurationError: ('Invalid value for', 'menu', "ImportError: Couldn't import zmi_views, No module named zmi_views")
---
Complete output there: http://pastebin.com/4ttSuCYp


I've tried with zope.app.file part from the same how-to but it raises a different error:
 File "/usr/lib/python2.7/email/mime/image.py", line 9, in &amp;lt;module&amp;gt;
    import imghdr
RuntimeError: sys.path must be a list of directory names
---
Complete output there: http://pastebin.com/ysH1VRA7

Thanks!
Mauro_______________________________________________
Grok-dev mailing list
Grok-dev&amp;lt; at &amp;gt;zope.org
https://mail.zope.org/mailman/listinfo/grok-dev
&lt;/pre&gt;</description>
    <dc:creator>Mauro Boschi</dc:creator>
    <dc:date>2012-05-22T15:48:54</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11510">
    <title>Pickle namespace clash</title>
    <link>http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11510</link>
    <description>&lt;pre&gt;Dear Grok Devs,

I've got Grok set up on a number of machines, and have started getting some
errors on my Mac OS X Lion machine
I had Grok set up nicely using mod_wsgi and the Enthought Python
Distribution, so that I could take advantage of Enthought's MKL libraries
with numpy, but a recent buildout has somehow killed it.

The end of the paster error is below.


  File 
"/Users/albl500/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/confi
guration/config.py", line 706, in finish
    actions = self.handler(context, **args)
  File 
"/Users/albl500/.buildout/eggs/z3c.autoinclude-0.3.3-py2.7.egg/z3c/autoinclu
de/zcml.py", line 51, in includeDependenciesDirective
    info = DependencyFinder(dist).includableInfo(['configure.zcml',
'meta.zcml'])
  File 
"/Users/albl500/.buildout/eggs/z3c.autoinclude-0.3.3-py2.7.egg/z3c/autoinclu
de/dependency.py", line 24, in includableInfo
    module = resolve(dotted_name)
  File 
"/Users/albl500/.buildout/eggs/zope.dottedname-3.4.6-py2.7.egg/zope/dottedna
me/resolve.py", line 32, in resolve
    found = __import__(used)
  File 
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-package
s/bimdp/__init__.py", line 82, in &amp;lt;module&amp;gt;
    from binode import (
  File 
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-package
s/bimdp/binode.py", line 77, in &amp;lt;module&amp;gt;
    import mdp
  File 
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-package
s/mdp/__init__.py", line 128, in &amp;lt;module&amp;gt;
    numx_rand, numx_version) = configuration.get_numx()
  File 
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-package
s/mdp/configuration.py", line 179, in get_numx
    import scipy as numx
  File 
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-package
s/scipy/__init__.py", line 85, in &amp;lt;module&amp;gt;
    from numpy import oldnumeric
  File 
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-package
s/numpy/oldnumeric/__init__.py", line 14, in &amp;lt;module&amp;gt;
    from compat import *
  File 
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-package
s/numpy/oldnumeric/compat.py", line 106, in &amp;lt;module&amp;gt;
    class Unpickler(pickle.Unpickler):
  File 
"/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-package
s/numpy/oldnumeric/compat.py", line 110, in Unpickler
    dispatch = copy.copy(pickle.Unpickler.dispatch)
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File
"/Library/GrokServer/SoS/server/parts/etc/site.zcml", line 4.2-4.27
    ZopeXMLConfigurationError: File
"/Library/GrokServer/SoS/server/src/SoS/configure.zcml", line 4.2-4.37
    AttributeError: 'builtin_function_or_method' object has no attribute
'dispatch'

I opened up compat.py
(https://github.com/numpy/numpy/blob/master/numpy/oldnumeric/compat.py), and
noticed that the error can be triggered when cPickle is used instead of
pickle. So, I figured an earlier 'import cPickle as pickle' statement could
be the problem. However, I've changed all such lines from my code, and still
get the same error. A grep -r of the egg cache shows that a couple modules
in ZODB3-3.10.5-py2.7 do use the 'import cPickle as pickle' statement ( only
in ZEO/scripts/zeoqueue.py, ZODB/utils.py &amp;amp; ZODB/tests/testUtils.py), but it
doesn't work if I change those either. There's even more

Has anyone got any ideas why this isn't working?
I can tell that pickle.Unpickler is a class, and that cPickle.Unpickler is a
function.
Usually though, if I 'import cPickle as pickle', and then 'import pickle',
pickle.Unpickler is a class.
However, that is exactly what isn't happening here. There is an 'import
pickle' line immediately before the block where this error is raised. Why
then, is it not importing the pure-python version of pickle? Any ideas??

Cheers,
Alex





_______________________________________________
Grok-dev mailing list
Grok-dev&amp;lt; at &amp;gt;zope.org
https://mail.zope.org/mailman/listinfo/grok-dev
&lt;/pre&gt;</description>
    <dc:creator>Alex Leach</dc:creator>
    <dc:date>2012-05-21T12:50:52</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11509">
    <title>Re: pickling of dynamic classes</title>
    <link>http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11509</link>
    <description>&lt;pre&gt;Hi,

You've hit the explanation exactly for your problem problem. The Pickle
module (and ZODB, by extension) can only store instances of classes that
exist at the top of modules.

This is because Pickle, when storing instances, stores the state of the
object (it's __dict__) with the name of the class and the name of the
module. When unpickling, It'll try to do the equivalent of:

module = sys.modules[module_name]
cls = getattr(module, class_name)
instance = cls.__new__()
instance.__dict__ = pickled_state

So, if your class does not exist at the top level, it can't be unpickled,
so it can't be pickled.

The only way to generate classes dynamically AND pickle their content is if
you store the generated class in some module. Something Like.

some_module.class_name = type('class_name', (&amp;lt;base class&amp;gt;,), dict())

However, this will only work if the above also happens before any class
instance is ever unpickled from the ZODB.

Hope it makes sense,

Cheers,

Leo

On Wed, May 16, 2012 at 1:24 PM, Anurag Sharma &amp;lt;a.sharma&amp;lt; at &amp;gt;chintan.in&amp;gt; wrote:

_______________________________________________
Grok-dev mailing list
Grok-dev&amp;lt; at &amp;gt;zope.org
https://mail.zope.org/mailman/listinfo/grok-dev
&lt;/pre&gt;</description>
    <dc:creator>Leonardo Rochael Almeida</dc:creator>
    <dc:date>2012-05-16T22:27:27</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11508">
    <title>pickling of dynamic classes</title>
    <link>http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11508</link>
    <description>&lt;pre&gt;Dear All,

This seems to be generally a problem with pickle but I hope I will be able
to get some inputs for the problem.

In one function of my grok.Application class I'm dynamically creating a
class

self.VarName = type('class name', (&amp;lt;base class&amp;gt;,), dict())
* &amp;lt;base class&amp;gt; does inherit grok.Container.*

While running this I'm getting following error:

Module ZODB.serialize:*422* in serialize
&amp;lt;http://localhost:8080/bizopine#&amp;gt;
__getstate__*(**)**)*
Module ZODB.serialize:*431* in _dump        &amp;lt;http://localhost:8080/bizopine#&amp;gt;
*PicklingError: Can't pickle &amp;lt;class '&amp;lt;appname&amp;gt;.app.&amp;lt;class name&amp;gt;'&amp;gt;:
attribute lookup **&amp;lt;appname&amp;gt;.app.&amp;lt;class name&amp;gt;** failed*

Pickling documentation does say that :
What can be pickled and unpickledclasses that are defined at the top level
of a module

*But is it the problem here and if yes then what can be the possible
solution for this ?*

Thanks,
Anurag
_______________________________________________
Grok-dev mailing list
Grok-dev&amp;lt; at &amp;gt;zope.org
https://mail.zope.org/mailman/listinfo/grok-dev
&lt;/pre&gt;</description>
    <dc:creator>Anurag Sharma</dc:creator>
    <dc:date>2012-05-16T11:24:30</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11507">
    <title>grokcore.resource</title>
    <link>http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11507</link>
    <description>&lt;pre&gt;After the recent grok sprint I have spent some hours taking parts of
megrok.resource and putting them in the grokcore.resource package:

svn+ssh://svn.zope.org/repos/main/grokcore.resource/trunk

grokcore.resource helps you use fanstatic resources in your view
components. Instead of `needing` resources in the update method of
your view components, you can use a directive to associate resources
with a view component, so instead of::

class MyView(grok.View):
    def update(self):
        myresource.need()

You write::

class MyView(grok.View):
    grok.resources(myresource)

This removes a lot of one-line update methods from our code base,
which is good. grokcore.resource works for grok.View, grok.Viewlet,
grok.Layout and grok.ContentProvider view components.

Are you ok with making this a part of grok? I created a branch of grok
in which I incorporated grokcore.resource:

svn+ssh://svn.zope.org/repos/main/grok/branches/janjaapdriessen-grokcore-resource

I would like you to try this out in your own applications. Let me know
if you have any questions.

JJ
&lt;/pre&gt;</description>
    <dc:creator>Jan-Jaap Driessen</dc:creator>
    <dc:date>2012-05-14T19:02:27</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11506">
    <title>Re: grokcore.resource</title>
    <link>http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11506</link>
    <description>&lt;pre&gt;Hi Danilo,

Thank you for your input.

On Wed, May 2, 2012 at 1:03 AM, Danilo G B &amp;lt;danilogbotelho&amp;lt; at &amp;gt;yahoo.com&amp;gt; wrote:

`resources` is a better name indeed. I changed it.


It was indeed not a good idea to include the resources of the parents
of an object. I removed this.


I am not sure how I feel about passing in the Layout class to the
`grok.resources` directive. I don't see an immediate use case in my
applications so I won't implement it now.


In the most recent release of grokcore.layout, this has been made
available as a "private" method. I am using that one to get to the
layout of a view.


Thanks for thinking with me. I will send a separate email to the
mailing list asking other developers to try grokcore.resource and
learn whether they find it useful.

Cheers,

JJ
&lt;/pre&gt;</description>
    <dc:creator>Jan-Jaap Driessen</dc:creator>
    <dc:date>2012-05-14T18:54:30</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11505">
    <title>Re: Static dir with grok.PageTemplateFile</title>
    <link>http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11505</link>
    <description>&lt;pre&gt;Hi Christian,

Thanks for that. I believe I am indeed using grokcore.view 2.7.

Soo, if I understand the CHANGES.txt correctly, I have to add a 
__static_name__ attribute to all forms that use the grok.PageTemplateFile 
directive, pointing to the relevant library.

Thanks, that works actually! In case anyone else comes across this, my form 
declaration now looks like:-


from app_name import resource

class AddSQLDatabaseForm(grok.AddForm):
grok.context(Server)
grok.implements(ISQLDatabase)
grok.name('addSQLdatabase')
form_fields = grok.AutoFields(ISQLDatabase)
template = grok.PageTemplateFile("edit-form.pt")
__static_name__ = resource.library

Cheers,
Alex


On Monday 14 May 2012 10:55:28 Christian Klinger wrote:
| Hi Alex,
| 
| we recently worked on the bavarian sprint on that topic. Which version
| of grokcore.view do you use?
| 
|  From the CHANGES.TXT in grokcore.view 2.7:
| 
| Fix how the static resource are found. Instead of using as name the
| package name where the component is defined, using as name the package
| where the template for the component is defined, or the base component.
| This is done by setting an attribute __static_name__ on the component
| that specify which resource directory should be used. This fix missing
| resources when you extend the component and don't redefined the template.
| 
| HTH
| 
| Christian

&lt;/pre&gt;</description>
    <dc:creator>Alex Leach</dc:creator>
    <dc:date>2012-05-14T11:08:25</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11504">
    <title>Re: Static dir with grok.PageTemplateFile</title>
    <link>http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11504</link>
    <description>&lt;pre&gt;Hi Alex,

we recently worked on the bavarian sprint on that topic. Which version
of grokcore.view do you use?

 From the CHANGES.TXT in grokcore.view 2.7:

Fix how the static resource are found. Instead of using as name the 
package name where the component is defined, using as name the package 
where the template for the component is defined, or the base component. 
This is done by setting an attribute __static_name__ on the component 
that specify which resource directory should be used. This fix missing 
resources when you extend the component and don't redefined the template.

HTH

Christian

Alex Leach schrieb:
&lt;/pre&gt;</description>
    <dc:creator>Christian Klinger</dc:creator>
    <dc:date>2012-05-14T08:55:28</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11503">
    <title>Static dir with grok.PageTemplateFile</title>
    <link>http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11503</link>
    <description>&lt;pre&gt;I have a few forms in separate modules that share the same template. Rather 
than having the template in the &amp;lt;module_name&amp;gt;_templates/ directory, I've got 
this one 'edit-form.pt' template in the bottom, src/ directory.

It worked fine, until I added a (conditional) include in the head of the page 
template, so that it downloads a CSS stylesheet if the form request wasn't 
done through an AJAX call.

So I'm getting an error now, whenever I request one of the forms which use 
this template, as it fails to find the static directory holding the CSS. I've 
tried adding `resource.style.need()` to the forms' update methods, but they 
still don't find the static directory. Part of the traceback shows this:-

Line 5, Column 10
In expression: &amp;lt;PathExpr standard:u'static/css/style.css'&amp;gt;

   - Names:
      {'args': (),
       'context': &amp;lt;server.app.Server object at 0x7f4878033668&amp;gt;,
       'default': &amp;lt;object object at 0x7f4891c0a490&amp;gt;,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': {},
       'request': &amp;lt;zope.publisher.browser.BrowserRequest instance 
URL=http://localhost:8080/develop2/addSQLdatabase&amp;gt;,
       'static': None,
       'template': &amp;lt;grokcore.view.components.TrustedFilePageTemplate object at 
0x40bc8d0&amp;gt;,
       'view': &amp;lt;server.BrowseSQL.AddSQLDatabaseForm object at 0x4b246d0&amp;gt;}

I reckon the problem is where it says: 'static' : None, but I don't know how 
to rectify that...

The class declaration I have for this form is:-

class AddSQLDatabaseForm(grok.AddForm):
    grok.context(Server)
    grok.implements(ISQLDatabase)
    grok.name('addSQLdatabase')
    form_fields = grok.AutoFields(ISQLDatabase)
    label = 'Add SQL database'
    template = grok.PageTemplateFile("edit-form.pt")
    &amp;lt; at &amp;gt;grok.action('New SQL database')
    def new_database(self,**kwargs):
        database = SQLDatabase(**kwargs)
        database.creator = self.request.principal.title
        database.creation_date = datetime.datetime.now()
        database.modification_date = datetime.datetime.now()
        dbname = kwargs.pop('database')
        self.context[dbname] = database
    def update(self):
        resource.style.need()



The relevant part of the page template file (edit-form.pt) is:-

&amp;lt;metal:block tal:condition="python:request.get('HTTP_X_REQUESTED_WITH',None) 
!='XMLHttpRequest'" &amp;gt;
    &amp;lt;head&amp;gt;
          &amp;lt;link rel="stylesheet" type="text/css" tal:attributes="href 
static/css/style.css"&amp;gt;
    &amp;lt;/head&amp;gt;
&amp;lt;/metal:block&amp;gt;


Any idea why it can't find the CSS file? That same tal:attributes URL works in 
all the module-specific page templates. Why not with this generic form 
template?

Thanks for any and all help,
Alex
&lt;/pre&gt;</description>
    <dc:creator>Alex Leach</dc:creator>
    <dc:date>2012-05-13T18:05:46</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11502">
    <title>Re: authentication and authorization</title>
    <link>http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11502</link>
    <description>&lt;pre&gt;please, have a look at dolmen.app.authentication for examples too.
http://gitweb.dolmen-project.org/dolmen.app.authentication.git?a=tree;f=src/dolmen/app/authentication;h=1b9f0d9a65d101077a0f82182e387183799bbb93;hb=f24fd82b80c687115513bfebd86a671cf28e3f1b
or the pypi release http://pypi.python.org/pypi/dolmen.app.authentication/1.0b3

2012/5/12 Alex Leach &amp;lt;albl500&amp;lt; at &amp;gt;york.ac.uk&amp;gt;:
&lt;/pre&gt;</description>
    <dc:creator>Souheil CHELFOUH</dc:creator>
    <dc:date>2012-05-12T13:25:06</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11501">
    <title>Re: authentication and authorization</title>
    <link>http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11501</link>
    <description>&lt;pre&gt;The same concepts in that documentation are relevant for the replacement 
modules. The imports are the main difference.

The PyPi pages for zope.authentication and zope.pluggableauth are good 
reference points.

Cheers,
Alex


On Saturday 12 May 2012 13:37:40 Anurag Sharma wrote:

Following link says information is outdated.
http://grok.zope.org/documentation/how-to/authentication-with-grok

Could somebody please point me to latest documentation on this ?

Thanks
Anurag



_______________________________________________
Grok-dev mailing list
Grok-dev&amp;lt; at &amp;gt;zope.org
https://mail.zope.org/mailman/listinfo/grok-dev
&lt;/pre&gt;</description>
    <dc:creator>Alex Leach</dc:creator>
    <dc:date>2012-05-12T12:30:10</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11500">
    <title>authentication and authorization</title>
    <link>http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11500</link>
    <description>&lt;pre&gt;Following link says information is outdated.
http://grok.zope.org/documentation/how-to/authentication-with-grok

Could somebody please point me to latest documentation on this ?

Thanks
Anurag
_______________________________________________
Grok-dev mailing list
Grok-dev&amp;lt; at &amp;gt;zope.org
https://mail.zope.org/mailman/listinfo/grok-dev
&lt;/pre&gt;</description>
    <dc:creator>Anurag Sharma</dc:creator>
    <dc:date>2012-05-12T08:07:40</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11499">
    <title>Re: megrok.rdb setup error</title>
    <link>http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11499</link>
    <description>&lt;pre&gt;You need to pin some libraries…

                       'megrok.rdb&amp;gt;=0.12',
                        'SQLAlchemy&amp;lt;=0.7',
                        'z3c.saconfig&amp;gt;=0.12',
                        'psycopg2&amp;gt;=2.4.2',

that setup works for me.

Jeffrey Peterson
bgpete3&amp;lt; at &amp;gt;gmail.com



On May 10, 2012, at 11:26 AM, Mauro Boschi wrote:

&lt;/pre&gt;</description>
    <dc:creator>Jeffrey Peterson</dc:creator>
    <dc:date>2012-05-10T18:05:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11498">
    <title>megrok.rdb setup error</title>
    <link>http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11498</link>
    <description>&lt;pre&gt;Hi to all,
I'm new with Grok!

As in http://grok.zope.org/documentation/how-to/orm-using-megrok.rdb-and-sqlalchemy

I have added megrok.rdb to setup.py

install_requires=['setuptools',
          ...
          # Add extra requirements here
          'megrok.rdb'
          ],

than run bin/buildout

restarting Grok I see this error:

# bin/paster serve --reload parts/etc/deploy.ini 
Starting subprocess with file monitor
Traceback (most recent call last):
File "bin/paster", line 20, in &amp;lt;module&amp;gt;
  paste.script.command.run()
File "/home/usytis/.buildout/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 104, in run
  invoke(command, command_name, options, args[1:])
File "/home/usytis/.buildout/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 143, in invoke
  exit_code = runner.run(args)
File "/home/usytis/.buildout/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 238, in run
  result = self.command()
File "/home/usytis/.buildout/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/serve.py", line 284, in command
  relative_to=base, global_conf=vars)
File "/home/usytis/.buildout/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/serve.py", line 321, in loadapp
  **kw)
File "/home/usytis/.buildout/eggs/PasteDeploy-1.3.4-py2.7.egg/paste/deploy/loadwsgi.py", line 203, in loadapp
  return loadobj(APP, uri, name=name, **kw)
File "/home/usytis/.buildout/eggs/PasteDeploy-1.3.4-py2.7.egg/paste/deploy/loadwsgi.py", line 224, in loadobj
  return context.create()
File "/home/usytis/.buildout/eggs/PasteDeploy-1.3.4-py2.7.egg/paste/deploy/loadwsgi.py", line 617, in create
  return self.object_type.invoke(self)
File "/home/usytis/.buildout/eggs/PasteDeploy-1.3.4-py2.7.egg/paste/deploy/loadwsgi.py", line 163, in invoke
  app = context.app_context.create()
File "/home/usytis/.buildout/eggs/PasteDeploy-1.3.4-py2.7.egg/paste/deploy/loadwsgi.py", line 617, in create
  return self.object_type.invoke(self)
File "/home/usytis/.buildout/eggs/PasteDeploy-1.3.4-py2.7.egg/paste/deploy/loadwsgi.py", line 109, in invoke
  return fix_call(context.object, context.global_conf, **context.local_conf)
File "/home/usytis/.buildout/eggs/PasteDeploy-1.3.4-py2.7.egg/paste/deploy/util/fixtypeerror.py", line 57, in fix_call
  val = callable(*args, **kw)
File "/home/usytis/.buildout/eggs/grokcore.startup-1.2-py2.7.egg/grokcore/startup/startup.py", line 14, in application_factory
  return zope.app.wsgi.getWSGIApplication(zope_conf)
File "/home/usytis/.buildout/eggs/zope.app.wsgi-3.13.0-py2.7.egg/zope/app/wsgi/__init__.py", line 162, in getWSGIApplication
  db = config(configfile, schemafile, features)
File "/home/usytis/.buildout/eggs/zope.app.wsgi-3.13.0-py2.7.egg/zope/app/wsgi/__init__.py", line 150, in config
  appsetup.config(options.site_definition, features=features)
File "/home/usytis/.buildout/eggs/zope.app.appsetup-3.15.0-py2.7.egg/zope/app/appsetup/appsetup.py", line 111, in config
  context = xmlconfig.file(file, context=context, execute=execute)
File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 649, in file
  include(context, name, package)
File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
  processxmlfile(f, context)
File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
  parser.parse(src)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 107, in parse
  xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
  self.feed(buffer)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 207, in feed
  self._parser.Parse(data, isFinal)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 349, in end_element_ns
  self._cont_handler.endElementNS(pair, None)
File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
  self.context.end()
File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
  self.stack.pop().finish()
File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
  actions = self.handler(context, **args)
File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
  processxmlfile(f, context)
File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
  parser.parse(src)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 107, in parse
  xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
  self.feed(buffer)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 207, in feed
  self._parser.Parse(data, isFinal)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 349, in end_element_ns
  self._cont_handler.endElementNS(pair, None)
File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
  self.context.end()
File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
  self.stack.pop().finish()
File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
  actions = self.handler(context, **args)
File "/home/usytis/.buildout/eggs/z3c.autoinclude-0.3.3-py2.7.egg/z3c/autoinclude/zcml.py", line 51, in includeDependenciesDirective
  info = DependencyFinder(dist).includableInfo(['configure.zcml', 'meta.zcml'])
File "/home/usytis/.buildout/eggs/z3c.autoinclude-0.3.3-py2.7.egg/z3c/autoinclude/dependency.py", line 24, in includableInfo
  module = resolve(dotted_name)
File "/home/usytis/.buildout/eggs/zope.dottedname-3.4.6-py2.7.egg/zope/dottedname/resolve.py", line 38, in resolve
  __import__(used)
File "/home/usytis/.buildout/eggs/megrok.rdb-0.12-py2.7.egg/megrok/rdb/__init__.py", line 1, in &amp;lt;module&amp;gt;
  from megrok.rdb.components import Model, Container, QueryContainer
File "/home/usytis/.buildout/eggs/megrok.rdb-0.12-py2.7.egg/megrok/rdb/components.py", line 46, in &amp;lt;module&amp;gt;
  class Container(MappedCollection):
File "/home/usytis/.buildout/eggs/megrok.rdb-0.12-py2.7.egg/megrok/rdb/components.py", line 62, in Container
  &amp;lt; at &amp;gt;collection.on_link
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/home/usytis/second/parts/etc/site.zcml", line 4.2-4.30
  ZopeXMLConfigurationError: File "/home/usytis/second/src/second/configure.zcml", line 4.2-4.37
  AttributeError: type object 'collection' has no attribute 'on_link'

If I try with sqlalchemy it works!

Thanks a lot!_______________________________________________
Grok-dev mailing list
Grok-dev&amp;lt; at &amp;gt;zope.org
https://mail.zope.org/mailman/listinfo/grok-dev
&lt;/pre&gt;</description>
    <dc:creator>Mauro Boschi</dc:creator>
    <dc:date>2012-05-10T16:26:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11497">
    <title>Re: PageTemplateFile('path/to/template.cpt') does notwork anymore</title>
    <link>http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11497</link>
    <description>&lt;pre&gt;
Actually, it getting clearer now:

The ChameleonPageTemplate class (subclassing from GrokTemplate) is the
component that is attached to a view by way of the grok.template()
directive. It is the glue between grok's idea of calling an template
(including injecting extra namespaces etc.) and the concrete template
implementation's rendering.

The ChameleonPageTemplateFile class is new to grokcore.chameleon and,
since it subclasses ChameleonPageTemplate and thus GrokTemplate, tries
to behave like a glue too, making it easier to point to a path relative
to the caller module.

In other words, ChameleonPageTemplateFile seems to be useful after all,
and can be used instead of the template =
ChameleonPageTemplate(filename='asdasdas.cpt') pattern that used to work
on grok view components.

Still I think the ChameleonPageTemplate(File) classes in
grokcore.chameleon.components could have a shorter name. This would mean
the helper PageTemplate(File) helper classes in
grokcore.chalemeon.components should be renamed to indicate there are
not very useful by themselves.

What do you think?

regards, jw
&lt;/pre&gt;</description>
    <dc:creator>Jan-Wijbrand Kolman</dc:creator>
    <dc:date>2012-05-07T11:31:25</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11496">
    <title>Re: PageTemplateFile('path/to/template.cpt') does not work anymore</title>
    <link>http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11496</link>
    <description>&lt;pre&gt;Hi JW,

On Mon, 07 May 2012 12:06:49 +0200 Jan-Wijbrand Kolman wrote:


Possibly, because the package grew out of megrok.chameleon which grew
out of another package that provided different pagetemplate engines
(Genshi, I think) and had to mark the differences in names. Clearly not
a valid reason any more.


I agree. The only reason to keep ChameleonPageTemplate would be to stay
backward-compatible. Don't know, however, whether it is used widely.


IMO that would be great :-)

Best regards,

&lt;/pre&gt;</description>
    <dc:creator>Uli Fouquet</dc:creator>
    <dc:date>2012-05-07T10:33:11</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11495">
    <title>Re: PageTemplateFile('path/to/template.cpt') does notwork anymore</title>
    <link>http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11495</link>
    <description>&lt;pre&gt;
Furthermore, AFAICT, the ChameleonPageTemplate(File) components do not
have a __call__ anymore, where I think we're used to the pattern of
calling a template to have it rendered.

regards, jw
&lt;/pre&gt;</description>
    <dc:creator>Jan-Wijbrand Kolman</dc:creator>
    <dc:date>2012-05-07T10:21:04</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11494">
    <title>Re: PageTemplateFile('path/to/template.cpt') does notwork anymore</title>
    <link>http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11494</link>
    <description>&lt;pre&gt;
I agree. To what extent is the PageTemplate(File) useful in itself?

In other words, why is there *both* a PageTemplate(File) *and* a
ChameleonPageTemplate(File).

I'd rather have just a PageTemplate(File) component. The package is
enough of a prefix to understand it is a chameleon-based template.

I could do that right now, as I'm fixing code in our applications
regarding this issue anyway...

regards, jw
&lt;/pre&gt;</description>
    <dc:creator>Jan-Wijbrand Kolman</dc:creator>
    <dc:date>2012-05-07T10:06:49</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11493">
    <title>Re: PageTemplateFile('path/to/template.cpt') does not work anymore</title>
    <link>http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/11493</link>
    <description>&lt;pre&gt;Hi Christian and JW,

On Mon, 07 May 2012 11:45:43 +0200 Christian Klinger wrote:


Wouldn't it make sense to offer `PageTemplateFile` as a shortcut as well
(additionally)?

Best regards,

&lt;/pre&gt;</description>
    <dc:creator>Uli Fouquet</dc:creator>
    <dc:date>2012-05-07T09:51:54</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.web.zope.grok.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.web.zope.grok.devel</link>
  </textinput>
</rdf:RDF>

