If you are running local just print to stdout

print request.vars.query.

-Thadeus





On Sun, Apr 11, 2010 at 12:32 PM, Johann Spies <johann.sp...@gmail.com> wrote:
> Thanks Thaddeus.  I am not winning (yet)!
>
> I have now:
>
>
> def csv():
>    import cStringIO
>    s=cStringIO.StringIO()
>    import gluon.conttenttype
>    query = request.vars.query
>    if not query:
>        return None
>    else:
>        
> db(request.vars.query).select(db.sarua.ALL,limitby=(0,250)).export_to_csv_file(s)
>        response.headers['Content-Type'] = \
>            gluon.contenttype.contenttype('.csv')
>    #response.headers['Content-Type']='application/vnd.ms-excel'
>        
> response.headers['Content-Disposition']=attachment;filename='download.csv'
>        return s.getvalue()
>
>
>
> How can I debug what is going on behind the browser screen?
>
> I want to see what the content of 'query'  is.  Is there a way to see
> what is the result
> --
> "Finally, brethren, whatsoever things are true,  whatsoever things are
> honest, whatsoever things are  just, whatsoever things are pure,
> whatsoever things are lovely, whatsoever things are of good report; if
> there be any virtue, and if there be any praise, think on these
> things."    Philippians 4:8
>
>
> --
> To unsubscribe, reply using "remove me" as the subject.
>

Reply via email to