Forget one thing :
def export_csv():
rows = db((db.tab1.id == *request.get_vars['tab1_id']*)).select()
return dict(rows=rows)
On Thu, Mar 15, 2012 at 6:16 PM, Richard Vézina wrote:
> I get it to work like this :
>
>
> def export_csv():
> rows = db((db.tab1.id == tab1_id)).select()
>
I get it to work like this :
def export_csv():
rows = db((db.tab1.id == tab1_id)).select()
return dict(rows=rows)
def export_default_analysis_request():
tab1_subset = (db.tab1.bool1 == True)
form = SQLFORM.factory(
Field('tab1_id', requires=IS_IN_DB(db(tab1_subset),'t
Ho yeah, I forget about that option...
Thanks Alan
Richard
On Wed, Mar 14, 2012 at 6:53 PM, Alan Etkin wrote:
> I have not experience with the book csv output example, but it looks
> different than your implementation:
>
> -It has a special view "/name.csv" to render the function output
>
I have not experience with the book csv output example, but it looks
different than your implementation:
-It has a special view "/name.csv" to render the function output
-The Content-Type parameter is "application-vnd.ms-excel"
I think you could change the response view parameter on form
vali
Worked !
On Feb 3, 5:41 pm, Anthony wrote:
> On Friday, February 3, 2012 6:16:09 PM UTC-5, Omi Chiba wrote:
>
> > Do I need to rewrite this "export_csv" function completely ? or Can I
> > just add import csv and set QUOTE_ALL ?
>
> > Controller
> > --
> > def export_csv():
On Friday, February 3, 2012 6:16:09 PM UTC-5, Omi Chiba wrote:
>
> Do I need to rewrite this "export_csv" function completely ? or Can I
> just add import csv and set QUOTE_ALL ?
>
>
> Controller
> --
> def export_csv():
> import gluon.contenttype
> response.he
Do I need to rewrite this "export_csv" function completely ? or Can I
just add import csv and set QUOTE_ALL ?
Controller
--
def export_csv():
import gluon.contenttype
response.headers['Content-Type'] = \
gluon.contenttype.contenttype('.csv')
db = reques
On Friday, February 3, 2012 4:03:47 PM UTC-5, Omi Chiba wrote:
>
> Oh my god, it worked again!!
>
> >I also want to export the csv file with " " for characters.
> Do you know if we can do this ? I want do quotechar='"' just like the
> following link.
>
>
> http://www.web2py.com/books/default/ch
OK. Can you send me the 4th ed markmin files ?
On Fri, Feb 3, 2012 at 3:03 PM, Omi Chiba wrote:
> Oh my god, it worked again!!
>
> >I also want to export the csv file with " " for characters.
> Do you know if we can do this ? I want do quotechar='"' just like the
> following link.
>
>
> http://w
Oh my god, it worked again!!
>I also want to export the csv file with " " for characters.
Do you know if we can do this ? I want do quotechar='"' just like the
following link.
http://www.web2py.com/books/default/chapter/29/6?search=csv#Data-representation
On Feb 3, 2:54 pm, Anthony wrote:
>
Take your query out of quotes -- a query has to be a DAL Query object, but
you have simply passed in a string.
Anthony
On Friday, February 3, 2012 3:31:23 PM UTC-5, Omi Chiba wrote:
>
> I want to export the specific table data to csv. I tried the code
> after appadmin but I got a "TypeError: 's
11 matches
Mail list logo