You can probably guess why I am suggesting this.  Doh!
Just two new lines in applications/admin/controllers/default.py under
the edit def try/except block:

try:
    olddata=data # GRAB OLD DATA
    data=request.vars.data.replace('\r\n','\n').strip()+'\n'
    open(apath(filename + '.bak'),'w').write(olddata) # SAVE TO BAK
FILE
    open(apath(filename),'w').write(data)
    response.flash=T("file saved on %(time)s",dict(time=time.ctime()))
except Exception: pass

You could even get fancy an add a Restore button.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
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