<commit_before>from flask import render_template, redirect, url_for

from app import app
from models_app import Package_app, Version_app
from forms import SearchForm

@app.route('/', methods=['POST', 'GET']) # navigation
@app.route('/nav/', methods=['POST', 'GET'])
def index():
    #packages = Package_app.query.order_by(Package_app.name).paginate(1, 10).items
    searchform = SearchForm()
    if searchform.validate_on_submit():
        return redirect(url_for("search", packagename=searchform.packagename.data))
    return render_template('index.html',
                           searchform=searchform)

<EMAIL>('/nav/search/', methods=['POST'])
@app.route('/nav/search/<packagename>')
def search(packagename):
    exact_matching = Package_app.query.filter_by(name=packagename).first()
    other_results = Package_app.query.filter(Package_app.name.like('%'+packagename+'%'))
    return render_template('search.html',
                           exact_matching=exact_matching,
                           other_results=other_results)
<commit_msg>app search: contains(str) in place of like(%str%)<commit_after>from flask import render_template, redirect, url_for

from app import app
from models_app import Package_app, Version_app
from forms import SearchForm

@app.route('/', methods=['POST', 'GET']) # navigation
@app.route('/nav/', methods=['POST', 'GET'])
def index():
    #packages = Package_app.query.order_by(Package_app.name).paginate(1, 10).items
    searchform = SearchForm()
    if searchform.validate_on_submit():
        return redirect(url_for("search", packagename=searchform.packagename.data))
    return render_template('index.html',
                           searchform=searchform)

<EMAIL>('/nav/search/', methods=['POST'])
@app.route('/nav/search/<packagename>')
def search(packagename):
    exact_matching = Package_app.query.filter_by(name=packagename).first()
    other_results = Package_app.query.filter(Package_app.name.contains(packagename))
    return render_template('search.html',
                           exact_matching=exact_matching,
                           other_results=other_results)

{'fraction_non_alphanumeric': 0.13405456255879586, 'fraction_numerical': 0.0028222013170272815, 'mean_word_length': 4.028368794326241, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3364197', 'n_tokens_mistral': 636, 'n_tokens_neox': 622, 'n_words': 114}