On Thu, Jun 9, 2011 at 11:59 PM, Bruno Binet <bruno.bi...@camptocamp.com> wrote:
> I would go back to this thread since I need to generate urls for
> static files served by add_static_view from an absolute path on the
> filesystem. But as Daniel mentionned, pyramid.url.static_url does not
> support absolute path as argument.
>
> What is the reason for that behavior, and is there a workaround to be
> able to generates urls for these absolute paths?
>
> FYI, my need is to have a user directory that is used to upload and
> retrieve files, and that could be located anywhere on the filesystem.

I have a similar need that I sorted out by having the absolute path in
the PasterDeploy .INI file. I can access the path from the request.

In my case I don't need to serve the files directly from my
application but you should be able to access the settings variable and
set the static view when creating the pyramid WSGI.

>
> Bruno
>
> On 3 February 2011 23:43, Daniel Nouri <daniel.no...@gmail.com> wrote:
>> The documentation [1] informs us that no absolute fs path may be
>> passed to "static_url".  Is that a technical limitation or a feature?
>> Or am I missing something entirely?
>>
>>
>> [1] 
>> http://docs.pylonsproject.org/projects/pyramid/dev/api/url.html#pyramid.url.static_url
>>
>> --
>> Daniel Nouri
>> http://danielnouri.org
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "pylons-discuss" group.
>> To post to this group, send email to pylons-discuss@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> pylons-discuss+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/pylons-discuss?hl=en.
>>
>>
>
>
>
> --
> Bruno Binet
>
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac, Cedex
>
> Mail : bruno.bi...@camptocamp.com
> http://www.camptocamp.com
>
> --
> You received this message because you are subscribed to the Google Groups 
> "pylons-discuss" group.
> To post to this group, send email to pylons-discuss@googlegroups.com.
> To unsubscribe from this group, send email to 
> pylons-discuss+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/pylons-discuss?hl=en.
>
>



-- 
Danny Navarro  |  http://dannynavarro.net

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

Reply via email to