def get(self): from admin.dump import DataDump dump = DataDump() filename = dump.do_backup() status = 'Backing up to %s' % (filename) self.response.content_type = 'text/plain' self.response.write(status)
def post(self): template = JINJA_ENVIRONMENT.get_template('templates/backup/backup.html') dump = DataDump() filename = dump.do_backup() message = 'Backing up to %s' % (filename) self.response.write(template.render({'message': message, 'files': self.get_files() }))
def post(self): template = JINJA_ENVIRONMENT.get_template( 'templates/backup/backup.html') dump = DataDump() filename = dump.do_backup() message = 'Backing up to %s' % (filename) self.response.write( template.render({ 'message': message, 'files': self.get_files() }))