I want to print request.args inside download controller for testing. But it
dosn't print anything. It print "request" but not request.args.
Download controller :
@cache.action()
def download():
"""
allows downloading of uploaded files
http://..../[app]/default/download/[filename]
"""
print request.args
return response.download(request, db)
View that calls download controller:
{{left_sidebar_enabled,right_sidebar_enabled=False,('message' in
globals())}}
{{extend 'layout.html'}}
<table border="1">
<tr>
<th>Name</th>
<th>Contract File</th>
</tr>
{{for contract in contracts:}}
<tr>
<td> {{=contract.contract_filename}} </td>
<td><a href="{{=URL('download',
args=contract.contract)}}">Download</a></td>
</tr>
{{pass}}
</table>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.