Your're right, this was just a very short description.
I was looking for a hint where to look or what to look for.


This one is the right description:

> Or you have two separate static
> directories that have two different names and you want them to both
> work?

I've two python modules with views and a static view each.
The directories and modules both have different names and the
configuration includes
... <other non static views>
config.add_static_view(name="manageview",
path="Poolyx.apps.apppool.manageview:static")
config.commit()
... <other non static views>
config.add_static_view(name="lcp",
"Poolyx.apps.player.lcPlayer.design:static")
config.commit()

Both static views register allright and static urls are generated as
expected
self.static_url("Poolyx.apps.player.lcPlayer.design:static/css/
layout.css")
returns "http://127.0.0.1:6543/lcp/css/layout.css";

Called in a webbrowser "http://127.0.0.1:6543/lcp/css/layout.css";
results in a NotFound with the following output in debug mode:

2011-07-27 18:53:56,936 route matched for url 
http://127.0.0.1:6543/lcp/css/layout.css;
route_name: 'lcp/', path_info: '/lcp/css/layout.css', pattern: 'lcp/
*subpath', matchdict: {'subpath': (u'css', u'layout.css')},
predicates: []

2011-07-27 18:53:56,938 debug_notfound of url 
http://127.0.0.1:6543/lcp/css/layout.css;
path_info: '/lcp/css/layout.css', context: <Poolyx.Helper.Portal
object at 0xa25facc>, view_name: u'', subpath: (u'css',
u'layout.css'), traversed: (), root: <Poolyx.Helper.Portal object at
0xa25facc>, vroot: <Poolyx.Helper.Portal object at 0xa25facc>,
vroot_path: ()

Files from "manageview" load allright.


If I change the order of the configuration above to ("lcp" first and
"manageview" second) the webbrowser loads the file (http://
127.0.0.1:6543/lcp/css/layout.css) as expected. Now all files in my
static "manageview" directory are not found.
... <other non static views>
config.add_static_view(name="lcp",
path="Poolyx.apps.player.lcPlayer.design:static")
config.commit()
... <other non static views>
config.add_static_view(name="manageview",
path="Poolyx.apps.apppool.manageview:static")
config.commit()


The problem only refers to static views. add_view(...) registrations
work allright. And I'm only using python calls, no decorators or
zcml.

I hope this is a better explanation. The code is part of a larger
application and I haven't tried to replicate this in a simple usecase
myself, yet. I can do that next and post the result.

Arndt.


-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to