Nope. Problem is still the same (i changed 'callback' to 'callable', though, in the snippet). I have all kinds of config actions before the 'add_static_view' directive, don't know whether this may influence the behaviour. It definitely makes it harder to isolate the problem. I guess for the time being I'll just live with the workaround - moving the 'add_static_view' directives to another place. I#d be curious, though, why only including pyramid_debugtoolbar triggers the problem. Should I try running pyramid 1.1.2 with pyramid_debugtoolbar and see if that changes anything? regards, robert
On Wed, Aug 24, 2011 at 8:22 PM, Chris McDonough <[email protected]> wrote: > On Wed, 2011-08-24 at 19:34 +0200, Robert Forkel wrote: >> hm. i didn't manage to build a minimal example which exhibits the >> problem. it's only in the main function of my big project that the >> placement of add_static_view seems to matter when including >> pyramid_debugtoolbar >> regards >> robert > > OK... all I can think it might be is this line: > > https://github.com/Pylons/pyramid/blob/master/pyramid/config/views.py#L1483 > > self.registrations.append((name, spec, False)) > > If you change that to: > > def register(): > self.registrations.append((name, spec,False)) > self.config.action(('add-static-view', name, spec), > callback=register) > > Does the problem go away? > > >> >> On Wed, Aug 24, 2011 at 3:03 PM, Chris McDonough <[email protected]> wrote: >> > On Wed, 2011-08-24 at 12:57 +0200, Robert Forkel wrote: >> >> ok, i managed to get it working. As far as I can see, what I had to >> >> do, was to call add_static_view before the first call to commit. Btw. >> >> this call to commit was inserted, following the advice here >> >> http://groups.google.com/group/pylons-discuss/msg/142933bc6df8f0ee >> >> >> >> Would an autocommitting configurator help with such issues? >> > >> > No. I don't really understand the issue. Can you provide a small >> > configuration sample that makes it repeatable? >> > >> > - C >> > >> > >> >> >> >> regards, >> >> robert >> >> >> >> On Wed, Aug 24, 2011 at 12:34 PM, Robert Forkel <[email protected]> >> >> wrote: >> >> > hi all, >> >> > just upgraded to pyramid 1.2a1 in particular to use >> >> > pyramid_debugtoolbar 0.7. Unfortunately, I cannot get it to work. When >> >> > I include pyramid_debugtoolbar, the static route for my project's >> >> > assets seems not to work anymore. I end up with errors like this: >> >> > >> >> > File ".../templates/site.mako", line 10, in render_body >> >> > <link rel="shortcut icon" href="${url.static('myproject:static/ >> >> > favicon.ico')}" /> >> >> > File ".../urlgenerator.py", line 36, in static >> >> > return self.request.static_url(asset_spec, **kw) >> >> > File ".../lib/python2.6/site-packages/pyramid/url.py", line 366, in >> >> > static_url >> >> > return info.generate(path, self, **kw) >> >> > File ".../lib/python2.6/site-packages/pyramid/config/views.py", line >> >> > 1413, in generate >> >> > return self.route_url(name, request, **kw) >> >> > File ".../lib/python2.6/site-packages/pyramid/url.py", line 505, in >> >> > route_url >> >> > return request.route_url(route_name, *elements, **kw) >> >> > File ".../lib/python2.6/site-packages/pyramid/url.py", line 126, in >> >> > route_url >> >> > raise KeyError('No such route named %s' % route_name) >> >> > >> >> > Any ideas? >> >> > regards, >> >> > robert >> >> > >> >> > -- >> >> > 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. >> >> > >> >> > >> >> >> > >> > >> > -- >> > 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. >> > >> > >> > > > -- > 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. > > -- 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.
