Beispiel #1
0
def users_search():
    if request.method == 'GET':

        form = SearchForm()

        return render_template("users/search.html", form=form)
    else:
        # TODO SEARCH
        form = SearchForm()

        username = form.username.data

        account_id = current_user.get_id()
        accounts = User.find_all_users_with_user_photos_not_itself_by_username(
            account_id, username)

        return render_template("users/search.html",
                               accounts=accounts,
                               form=form)