def download_file(): cursor = mongo.db.semaphore_telemetry.find({'id': '0001A12X1201804'}) #return render_template("index.html",online_users=online_users) pprint.pprint(cursor) rows = ['pedro', 'marta', 'rodrigo'] rows1 = [['Pedro'], ['Marta'], ['Rodrigo']] return excel.make_response_from_tables(mongo.db.sesseion, [cursor], "xls")
def export_excel(): if not login_session['admin_login']: return render_template('admin_login.html') global ex_sender ex_sender = True return excel.make_response_from_tables(session, [Studentreg], "xls", file_name=str( datetime.datetime.date))
def upload_all(): def category_init_func(row): c = Category(row['name']) c.id = row['id'] return c def post_init_func(row): # this is lessons learned that relation needs an object not a string c = Category.query.filter_by(name=row['category']).first() p = Post(row['title'], row['body'], c, row['pub_date']) return p request.save_book_to_database( field_name='file', session=db.session, tables=[Category, Post], initializers=[category_init_func, post_init_func]) return excel.make_response_from_tables(db.session, [Category, Post], "xls")
def doexport_sngorders(): return excel.make_response_from_tables(db.session, [Sngorders], "xls")
def doexport_studios(): return excel.make_response_from_tables(db.session, [Studios], "xls")
def handson_table(): return excel.make_response_from_tables(db.session, [Category, Post], 'handsontable.html')
def doexport(): return excel.make_response_from_tables(db.session, [Category, Post], "xls")
def handson_table(): return excel.make_response_from_tables(db.session, [Competancy_rec], 'handsontable.html')
def handson_table(): return excel.make_response_from_tables( db.session, [Area, Docente, Tipo, Curso, Uc, Plano], 'handsontable.html')
def doexport(): return excel.make_response_from_tables( db.session, [Area, Docente, Tipo, Curso, Uc, Plano], "xls")
def descargar_productos(): now = datetime.now() return excel.make_response_from_tables( db.session, [Alimento, Venta], 'xlsx', file_name='productos_{}'.format(now.strftime("%m_%d_%Y_%H%M%S")))
def doexport(): return excel.make_response_from_tables(db.session, [Reports], "xls")
def export_user(): return excel.make_response_from_tables(db.session, [User], "xls", file_name="utilisateur")
def doexport(): return excel.make_response_from_tables(db.session, [User, Category, Customer, Project, Order, Study, Subject, Program, Origin, Mesure, JoncType, Patient, Support, Sample, SampleNature, SampleType, Temperature, Box, Rack, Equipment, Hole, Sample], "xls", file_name="template")
def handson_table(): return excel.make_response_from_tables( db.session, [User, Category, Study, Subject, Program, Origin, SampleNature, SampleType, Mesure, JoncType, Support, Temperature, Basket], 'setup/handsontable.html')
def export_records(): return excel.make_response_from_tables(db.session, [Car], "xls")