1

I'm making an autocomplete function with ajax and I get my suggestion data from my database. it get's this error: type error: 'BaseQuery' is not callable

cant understand that error. Any help on this.

 @app.route('/search', methods =['GET','POST'])
    def search():
      if request.method=='POST':
          result=[]

          search = request.form['search']
          result = Data.query.filter(Data.name.like('%'+search+'%'))
          return result
      else:
          search = ''
      return render_template("test.html")
davidism
  • 121,510
  • 29
  • 395
  • 339

0 Answers0