Example #1
0
def build_refsets(save_after_every_profile=False):
    refset_builder = RefsetBuilder()

    q = db.session.query(Profile)
    for profile in windowed_query(q, Profile.url_slug, 25):
        refset_builder.process_profile(profile)
        if save_after_every_profile:
            save_all_reference_set_lists(refset_builder)

    save_all_reference_set_lists(refset_builder)
Example #2
0
def build_refsets(save_after_every_profile=False):
    refset_builder = RefsetBuilder()

    q = db.session.query(Profile)
    for profile in windowed_query(q, Profile.url_slug, 25):
        refset_builder.process_profile(profile)
        if save_after_every_profile:
            save_all_reference_set_lists(refset_builder)

    save_all_reference_set_lists(refset_builder)
Example #3
0
def reference_sets():
    rows = RefsetBuilder.export_csv_rows()

    resp = make_response("\n".join(rows), 200)

    # resp.mimetype = "text/text;charset=UTF-8"

    # Do we want it to pop up to save?  kinda nice to just see it in browser
    resp.mimetype = "text/csv;charset=UTF-8"
    #resp.headers.add("Content-Disposition", "attachment; filename=refsets.csv")
    resp.headers.add("Content-Encoding", "UTF-8")

    return resp