def show_found(): page = request.args.get('page', 1, int) query_clauses = url_pickle_load(request.args.get('query_clauses')) display_fields = url_pickle_load(request.args.get('display_fields')) action = query_fields_action(query_clauses) return Query.show_found_do(query_clauses, display_fields, page, action=action, show_fn='extracts_show')
def list_members(): if 'query_clauses' in request.args: query_clauses = url_pickle_load(request.args.get('query_clauses')) else: query_clauses = None page = request.args.get('page', 1, int) form = MemberListForm() form.set_status_choices() form.set_membership_type_choices() form.set_initial_counts() form.populate_member_list(query_clauses, url_pickle_dump(query_clauses), page) return render_template('member_list.html', form=form, render_link=render_link)
def bulk_update(): form = QueryForm() form.set_status_choices() if form.validate_on_submit(): if form.submit.data: query_clauses = url_pickle_load( request.args.get('query_clauses')) query = get_members_for_query(query_clauses) updates = form.get_updates() # ToDo: update here # flash updated return ##redirect(url_for('extracts_bulk_update', query_clauses=query_clauses)) elif form.errors: flash_errors(form) return render_template('query.html', form=form, render_link=render_link, title='Bulk update')
def extract(): query_clauses = url_pickle_load(request.args.get('query_clauses')) display_fields = url_pickle_load(request.args.get('display_fields')) return Query.extract_do(query_clauses, display_fields)
def reset_member_actions(query_clauses): reset_member_actions_for_query(url_pickle_load(query_clauses))