Hello,

 

I'm pretty new to Web2py.  I need some help with the SQLForm.grid export 
CSV functionality.    I have the following basic structure:

 

*db.py*

db.define_table('test',

                Field('name', 'string', length=50, notnull=True),

                Field('email', 'string', notnull=True),

                format="%(name)s")

*default.py*

def index():

    query=(db.test.id>0)

    fields=[db.test.id,db.test.name,db.test.email]

    forms=SQLFORM.grid(query=query, csv=True)

    return dict(forms=forms)

 

For some reason only the JSON and XML exports work but the CSV and TSV 
exports won't work.  For CSV, I keep getting the following error:

 

*<type 'exceptions.AttributeError'>*

 

NOTE: my argument list looks like this: 

*Function argument list*

(self=<Row {'email': 't', 'name': 'ryan', 'id': 1L}>, k='_extra')

 

NOTE: I have tried a couple different versions of Web2py on both CentOS and 
Windows and same error.

 

I'm sure I'm missing something small, but haven't been able to track it 
down.  Any help would be appreciated.

 

Thank you,

ryan

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to