:
Is there a Pylons equivalent of CherryPy's serve_file ?
I'm trying to allow file download for files that are not in the
'public' directory
In cherry py, it'd go something like this:
from cherrypy.lib.static import serve_file
class Root:
[EMAIL PROTECTED]
def download(self, name
On Tue, Jun 24, 2008 at 7:41 PM, Chris [EMAIL PROTECTED] wrote:
Is there a Pylons equivalent of CherryPy's serve_file ?
I'm trying to allow file download for files that are not in the
'public' directory
In cherry py, it'd go something like this:
from cherrypy.lib.static import serve_file
disclaimer - i'm no authority on pylons.
the stock error controller (automagically generated) handles the magic
error pages
it has this in there:
def img(self, id):
Serve Pylons' stock images
return self._serve_file(os.path.join(media_path, 'img', id))
def style(self,
This is from an older application that I did, might need to be looked over
for 0.9.6.2 compatibility:
def download(self, environ, start_response):
if not request.environ.has_key('REMOTE_USER'):
return redirect_to(controller = '/login/ldap')
else:
fapp =