Ejemplo n.º 1
0
def index():
    search = MusicSearchForm(request.form)
    if request.method == 'POST':
        return search_results(search)

    return render_template('index.html', form=search)
Ejemplo n.º 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=[])