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 <[email protected]> wrote:
> Please tell us more. I am not sure I understand what you want to do.
>
> On Dec 21, 8:45 am, vvk <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 [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.