예제 #1
0
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))
예제 #3
0
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")
예제 #4
0
파일: views.py 프로젝트: raikerz/Repos
def doexport_sngorders():
    return excel.make_response_from_tables(db.session, [Sngorders], "xls")
예제 #5
0
파일: views.py 프로젝트: raikerz/Repos
def doexport_studios():
    return excel.make_response_from_tables(db.session, [Studios], "xls")
예제 #6
0
def handson_table():
    return excel.make_response_from_tables(db.session, [Category, Post],
                                           'handsontable.html')
예제 #7
0
def doexport():
    return excel.make_response_from_tables(db.session, [Category, Post], "xls")
예제 #8
0
def handson_table():
    return excel.make_response_from_tables(db.session, [Competancy_rec], 'handsontable.html')
예제 #9
0
def handson_table():
    return excel.make_response_from_tables(
        db.session, [Area, Docente, Tipo, Curso, Uc, Plano],
        'handsontable.html')
예제 #10
0
def doexport():
    return excel.make_response_from_tables(
        db.session, [Area, Docente, Tipo, Curso, Uc, Plano], "xls")
예제 #11
0
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")))
예제 #12
0
파일: views.py 프로젝트: raikerz/ITS_DB
def doexport():
    return excel.make_response_from_tables(db.session, [Reports], "xls")
예제 #13
0
def export_user():
    return excel.make_response_from_tables(db.session, [User], "xls", file_name="utilisateur")
예제 #14
0
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")
예제 #15
0
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')
예제 #16
0
def export_records():
    return excel.make_response_from_tables(db.session, [Car], "xls")