as a short term trunk, you could just replace the first line in a the
csv file.

On Jan 5, 10:37 am, mdipierro <[email protected]> wrote:
> Right now there is no way to customize the column names in
> export_to_csv_file.
> We could add it. do you call export_to_csv_file explicitly?
>
> On Jan 5, 10:23 am, Neveen Adel <[email protected]> wrote:
>
> > I want  to rename The column names to be readable to users and then i
> > will generate the csv report by str(family_members) so i cant use
> > SQLTable.
>
> > And by using
> >  db.member.name.label = name
> >  db.member.member_id = member ID
>
> > the columns are displayed with their names e.g: member.name and
> > member.membership_id
>
> > so please do you have any suggestions
>
> > Thanks
>
> > On Jan 5, 4:38 pm, mdipierro <[email protected]> wrote:
>
> > > Please do not override family_members.colnames. This was an internal
> > > thing and its behavior changed in 1.72.*
> > > Use db.table.field.label instead or SQLTABLE(rows,headers={})
> > > depending on what you need.
>
> > > On Jan 5, 4:12 am, Neveen Adel <[email protected]> wrote:
>
> > > > when i do the following code:
>
> > > > family_members =db(db.member.id == membership_id).select
> > > > (db.member.name,db.member.id)
> > > > family_members.colnames = ('Name ','Membership ID')
>
> > > > It cause the following error
> > > > ""
> > > > Traceback (most recent call last):
> > > >   File "/home/abeer/Desktop/web2py/New_version/web2py_src/web2py/gluon/
> > > > restricted.py", line 184, in restricted
> > > >   File "/home/abeer/Desktop/resources/web2py/New_version/web2py_src/
> > > > web2py/applications/init/views/default/updateMember.html", line 142,
> > > > in <module>
> > > >   File "/home/abeer/Desktop/web2py/New_version/web2py_src/web2py/gluon/
> > > > globals.py", line 112, in write
> > > >   File "/home/abeer/Desktop/web2py/New_version/web2py_src/web2py/gluon/
> > > > html.py", line 103, in xmlescape
> > > >   File "/home/abeer/Desktop/web2py/New_version/web2py_src/web2py/gluon/
> > > > sql.py", line 3326, in xml
> > > >   File "/home/abeer/Desktop/web2py/New_version/web2py_src/web2py/gluon/
> > > > sqlhtml.py", line 980, in __init__
> > > >   File "/home/abeer/Desktop/web2py/New_version/web2py_src/web2py/gluon/
> > > > sql.py", line 621, in __getattr__
> > > >   KeyError: '_extra'
>
> > > > ""
> > > > P.s. : when i commented the lone (family_members.colnames = ('Name
> > > > ','Membership ID')) it works fine i dont why??
>
> > > > Thanks
>
>
-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to