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")
0

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.