I take backups regularly, at say time1, time2, time3.
If I provide this function:
def myaction():
     import cStringIO
     file = cStringIO.StringIO()
     db(...).select().export_to_csv_file(file)
     return file.getvalue()
I'll be able to download DB at current state, not of previous times. I
want to download csv files having old databases.




On Dec 21, 8:05 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
> Please tell us more. I am not sure I understand what you want to do.
>
> On Dec 21, 8:45 am, vvk <varunk.ap...@gmail.com> wrote:
>
> > Sir,
> > thanks for reply in detailed manner, but I have multiple backups of my
> > system, I want to store them in a table or some place which can be
> > downloadable. Is there any way to accomplish this?
>
> > On Dec 19, 7:50 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > > You uness you are customizing export_to_csv_file you can just do
>
> > > def myaction():
> > >     import cStringIO
> > >     file = cStringIO.StringIO()
> > >     db(...).select().export_to_csv_file(file)
> > >     return file.getvalue()
>
> > > and call withhttp://...../myaction.csvsothatyou get the right
> > > content-type.
>
> > > The .csv does all the trink
>
> > > On Dec 19, 8:24 am, vvk <varunk.ap...@gmail.com> wrote:
>
> > > > I'm creating a csv file using db_export_to_csv. I want to make this
> > > > csv file downloadable.
> > > > "Download" function isn't allowing me to download this csv file
> > > > because it's not present in any table. I thought of exporting csv file
> > > > directly into a table, but unable to find any syntax for that. Any
> > > > help would be greatly appreciated.

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to