[Zope3-Users] z3c.sampledata experts please

Darryl Cousins darryl at darrylcousins.net.nz
Sun Nov 12 21:24:30 EST 2006


Hi,

I've found something which may help someone help me.

I have placed the following in z3c.sampledata.manager in the generate
method:

    def generate(self, context=None, param={}, seed=None):
        plugins = self.orderedPlugins()

        for info in plugins:
            print "================ info.name", info.name
            print "================ info.contextFrom", info.contextFrom

When I run the sample generator for the utility alone I get:

================ info.name z3c.sampledata.site
================ info.contextFrom None
================ info.name tfws.gallery.utility
================ info.contextFrom z3c.sampledata.site

BUT when run with photofolder I get 

================ info.name z3c.sampledata.site
================ info.contextFrom None
================ info.name tfws.gallery.utility
================ info.contextFrom None
================ info.name tfws.gallery.photofolder
================ info.contextFrom z3c.sampledata.site

So I'm trying to discover why the contextFrom for the utility is lost.
The most relevant configuration is below.

      <SampleManager
        name="Sample photo utility"
        >
        <generator
          name="tfws.gallery.utility"
          dataSource="tfws.gallery.utility"
          dependsOn="z3c.sampledata.site"
          contextFrom="z3c.sampledata.site" />
        <datasource
		...
          />
      </SampleManager>

      <SampleManager
        name="Sample photofolder"
        >
        <generator
          name="tfws.gallery.photofolder"
          dependsOn="z3c.sampledata.site
                     tfws.gallery.utility"
          contextFrom="z3c.sampledata.site"
          dataSource="tfws.gallery.photofolder"
          />
        <datasource
		...
          />
      </SampleManager>



More information about the Zope3-users mailing list