Ejemplo n.º 1
0
def api_users_typeahead():
    """ Take a partially typed user name and return records that match it.
    """
    # TODO: This doesn't work!?
    needle = request.form["term"]
    if not needle:
        matches = ['eric', 'ernie', 'columbia']
    else:
        matches = Users.typeahead(needle)
    return jsonify(result=matches)
Ejemplo n.º 2
0
def api_users_typeahead():
    """ Take a partially typed user name and return records that match it.
    """
    # TODO: This doesn't work!?
    needle = request.form["term"]
    if not needle:
        matches = ['eric', 'ernie', 'columbia']
    else:
        matches = Users.typeahead(needle)
    return jsonify(result=matches)