[Grok-dev] Using static resources from a sub-package?

Magga elsku.magga at gmail.com
Wed Mar 30 15:08:31 EDT 2011


Hi guys, are people generally not sub-packaging the src folder? It is
handy in bigger projects.

Cheers,
Magga

On Mar 17, 5:06 pm, Kevin Teague <ke... at bud.ca> wrote:
> Using Grok 1.3 with the new fanstatic package, it doesn't seem like
> the static directory can be accessed if the View is contained within a
> sub-package of the main application package.
>
> For example, given 'testproject' with this layout:
>
> ./src/testproject/app.py
> ./src/testproject/app_templates/index.pt
> ./src/testproject/pages/thing.py
> ./src/testproject/pages/thing_templates/thing.pt
>
> Then the template in app_templates has no problem using something like
> the example link to a static directory:
>
> <img tal:attributes="src static/evencaveman.jpg"/>
>
> Move this line into the thing.pt template in a sub-package though, and
> the static variable for the View is being set to None. And things
> break :(
>
> So this seems like a bug to me ... unless sub-packages are not being
> supported or something else? Anyone else noticed this?
> _______________________________________________
> Grok-dev mailing list
> Grok-... at zope.orghttps://mail.zope.org/mailman/listinfo/grok-dev


More information about the Grok-dev mailing list