Hi Dave

Could you please show me more detail in code since i need to download the 
CSV file store in the table?

On Tuesday, May 28, 2019 at 11:00:42 PM UTC-7, Quang Lam wrote:
>
> Hi, i have a problem to display the CSV file stored in the table.
>
> the code below is in controller 
>
> def view_performance():
>     files = db.Pass_Configuration(request.args(0, cast=int)) or 
> redirect(URL('index'))   // get the ID of Pass_Configuration table form the 
> URL
>     return dict(files=files)
>
> def download():
>     return response.download(request, db)           //download function 
>
>
> the code in the View as follows
>
> {{extend 'layout.html'}}
> <h1>{{='Performance'}}</h1><br>
> src="{{=URL('download', args=files.PerformanceFile)}}"   
>
> i know i get the path to the file right but somehow it does not display 
> the CSV file. it just displays the file path and nothing else. i know i am 
> missing something but could not figure out
> could you please help me to point out what the mistake i have and how to 
> fix it. thanks
>

-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/f5492680-13b8-416d-94f8-a28b63bdcb12%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to