Exemple #1
0
def studios():
  if request.method == 'POST':
    keyword = request.form['keyword']
    res = searchStudio(keyword)
    if len(res) == 0:
      return redirect(url_for('noresults'))
    else:
      return res[0].name
  else:
    return render_template('studios.html')
Exemple #2
0
def studios():
  if request.method == 'POST':
    keyword = request.form['search field']
    res = searchStudio(keyword)
    if len(res) == 0:
      return redirect(url_for('noresults'))
    else:
      return render_template('studios.html', title='Studios', pageActive='studios', searchValue='STUDIO', studios=res[0:15])
  else:
    return render_template('studios.html', title='Studios', pageActive='studios', searchValue='STUDIO')