On Tue, 2011-11-01 at 19:54 -0700, Anthony wrote: > If these are purely static files, why do you need web2py to serve > them? Can't you set up your web server to serve them from where they > are, or do you only have web2py's built-in server available (if so, > maybe you can run a separate instance of Rocket using the fs > method: http://packages.python.org/rocket/methods.html#fs)?
+1
Plus, if you are running web2py via apache, my suggestion is something
like this:
- Configure an alias (``Alias /reports /path/to/reports``) in the
virtualhost configuration
- Configure in your app that ``reports_url = "/reports/"`` and
``reports_path = "/path/to/reports"``
- Browse files into reports_path and then link them using
``posixpath.join(reports_url, 'path/to/file')``
[posixpath uses UNIX file names, so it joins using '/'; only on Unix
platforms (a part from macosx..?) os.path == posixpath]
--
Samuele ~redShadow~ Santi
----------------------------------------------------------------
redshadow[at]hackzine.org - redshadowhack[at]gmail.com
Blog: http://hackzine.org
GPG Key signature:
050D 3E9F 6E0B 44CE C008 D1FC 166C 3C7E EB26 4933
----------------------------------------------------------------
/me recommends:
Squadra Informatica - http://www.squadrainformatica.com
----------------------------------------------------------------
- Proud ThinkPad T-Series owner
- Registered Linux-User: #440008
* GENTOO User since 1199142000 (2008-01-01)
* former DEBIAN SID user
----------------------------------------------------------------
"Software is like sex: it's better when it's free!"
-- Linus Torvalds
signature.asc
Description: This is a digitally signed message part

