[Grok-dev] Problem with packages containing views

Steve Schmechel steveschmechel at yahoo.com
Wed Oct 7 23:22:04 EDT 2009


Hi Stefano,

I will first ask for some simple clarifications to find any real
obvious mistakes - the kind I always seem to make :-)

If this doesn't help and it turns out to be something deep in the 
grokking process, someone else will hopefully help as I am not a 
guru in that area.

Comments are in-line:

--- On Wed, 10/7/09, Stefano Borini <stefano.borini at ferrara.linux.it> wrote:
> 
> - created views directory
> - copied views.py into views/__init__.py
Do you mean that you copied all the code from the "too big" views.py 
module into __init__.py?
You didn't further break the code into modules within the package?

> - removed views.pyc
> - moved views_templates into views/templates
Do you mean you moved the contents of the directory (views_templates/*.pt)
into the views/templates directory?
(For example - "views/templates/myview.pt"
**not** - "views/templates/views_templates/myview.pt")

> - added grok.templatedir("templates") into
> views/__init__.py (first 
> lines, right after import grok)
Question to grok devs: Is the __init__.py of a package grokked also or just the appropriate classes defined within other modules in a package?
(Maybe it doesn't matter, but it would be an odd place to try to follow 
the default template directory naming convention, as you would 
potentially get a template for a view defined in __init__.py expected 
at: "__init___templates/someview.pt")

> 
> however, grok fails to find the templates for my views.
> What am I doing 
> wrong?
> 
> Thank you for your help
> 
> Stefano
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> https://mail.zope.org/mailman/listinfo/grok-dev
> 


      


More information about the Grok-dev mailing list