예제 #1
0
def my_shell_history_search(page, regex):
    commands = current_user.get_commands(only_public=False).filter(
        Command.text.op("~")(regex)).paginate(per_page=100, page=page)
    return render_template(
        "shell_history.html",
        commands=commands,
        title=u"My Shell History: search results for [{}]".format(regex))
예제 #2
0
파일: app.py 프로젝트: 1135586/histsync
def my_shell_history(page):
    search_form = SearchForm()
    if search_form.validate_on_submit():
        return redirect(url_for("my_shell_history_search", regex=search_form.regex.data))

    commands = current_user.get_commands(only_public=False).paginate(per_page=100, page=page)
    return render_template("shell_history.html", commands=commands, search_form=search_form, title="My Shell History")
예제 #3
0
파일: app.py 프로젝트: 1135586/histsync
def my_shell_history_search(page, regex):
    commands = (
        current_user.get_commands(only_public=False)
        .filter(Command.text.op("~")(regex))
        .paginate(per_page=100, page=page)
    )
    return render_template(
        "shell_history.html", commands=commands, title=u"My Shell History: search results for [{}]".format(regex)
    )
예제 #4
0
def my_shell_history(page):
    search_form = SearchForm()
    if search_form.validate_on_submit():
        return redirect(
            url_for("my_shell_history_search", regex=search_form.regex.data))

    commands = current_user.get_commands(only_public=False).paginate(
        per_page=100, page=page)
    return render_template("shell_history.html",
                           commands=commands,
                           search_form=search_form,
                           title="My Shell History")