def index():
    search = MusicSearchForm(request.form)
    if request.method == 'POST':
        return search_results(search)

    return render_template('index.html', form=search)
Beispiel #2
0
def search():
    search = MusicSearchForm(request.form)
    if request.method == 'POST':
        return render_template('search.html', form=search, results=search_results(search)['audio'])
    return render_template('search.html', form=search, results=[])