``static_url``

19 views
Skip to first unread message

Andi Balke

unread,
Nov 1, 2012, 1:33:54 PM11/1/12
to pylons-discuss
hi, 

i'm a bit confused by the handling of ``static_url``. assuming this code:: 

config.add_static_view(name='blob', path='/Users/andi/foo/bar')

i expect a static route to be registered, which causes all requests to ``/blob/*`` to be handled to ``/Users/andi/foo/bar/*``. so far all is clear. 

but how should i use ``request.static_url()``? as far as i understand the docu and the code, i have to ask for::

request.static_url('/Users')

to get a useful result. this is not what i expect as ``'/Users'`` should be cascaded by this functionality. 

i imagine something like ``request.static_url('/blob/file.ext')``.

what part did i understand wrong? would be cool if someone has a solution to that.

best, andi
Reply all
Reply to author
Forward
0 new messages