[Grok-dev] Re: Nesting packages in src
Darryl Cousins
darryl at darrylcousins.net.nz
Sat Mar 10 03:59:54 EST 2007
On Sat, 2007-03-10 at 21:26 +1300, Darryl Cousins wrote:
> On Sat, 2007-03-10 at 09:00 +0100, Martijn Faassen wrote:
> > Darryl Cousins wrote:
> > [snip]
> > > Is this by design? Without the view the App object can be added in the
> > > grok admin ui. Or if all code is the top (tfws) package the code works.
> > >
> > > This is unfortunate I believe because a complex app would then end up
> > > with a overloaded top package if subpackages cannot be used.
> > >
> > > Likewise how would a number of grokker packages be grouped into a single
> > > namespace?
> > >
> > > Thoughts?
> >
> > From your description, I think that you've discovered a bug. It sounds
> > like Grok is somehow looking in the wrong package for its templates.
> > Could you perhaps add this bug to launchpad? (patch with new test and
> > bugfix preferred of course :)
> >
> > Regards,
> >
> > Martijn
>
> Hi Martijn,
>
> Cheers for the reply. I'll set up a test instance and try to find where
> Grok is looking to match the template. If I find that and why, I could
> well have a patch.
>
> Regards,
> Darryl
Hi all,
No patch required. I was real happy with how quickly I could reconstruct
the same environment as I had earlier today thanks to setuptools. The
option --with-zope3=/path/to/zope3 is a wonderful thing. I suggest that
--with-grok=/path/to/grok would also speed up installs.
(Maybe this is otherwise possible in options, I'm a newbee with
setuptools).
It all went fine:
`-- src
`-- multipackage
|-- __init__.py
`-- mycomponent
|-- README.txt
|-- __init__.py
|-- app.py
|-- app_templates
| `-- index.pt
|-- configure.zcml
`-- static
Damn. Or rather, Grok! No bug. Cool.
The bug I had was because I had the package 'mycomponent' named 'app' -
and only 24 hours ago I heard Peter say that that is not good with
Python on his Snow cast. I tried too just now to rename the mycomponent
to app with predictable consequences.
Kind regards,
Darryl
More information about the Grok-dev
mailing list