def index(): search = MusicSearchForm(request.form) if request.method == 'POST': return search_results(search) return render_template('index.html', form=search)
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=[])