Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Autocomplete Textbox Example in python + Google app engine

For my google app engine application, I need to include a autocompleter Textbox which will show the name starting with the textbox value.And the name will retrieve from the google app engine datastore.

Any good tutorial or sample code please.

Update: Please Answer for this

I created a sample HTML code : dl.dropbox.com/u/7384181/autocomplete/autocomplete.html . In this html page i have creating the textbox dinamically.So currently i assign the autocomplete in the first textbox(txtProduct1) only. How do i assign the autocomplete in rest all the textbox which is going to create dynamically ?

like image 372
Nijin Narayanan Avatar asked May 09 '11 10:05

Nijin Narayanan


1 Answers

You can have a look at the jquery auto complete here

HTML :

$("#search_users").autocomplete(/search/search_manager);

python-controller:

jquery autocomplete plugin by default uses variable q

class search_user(webapp.RequestHandler):
            q = (self.request.GET['q']).lower() 
            results=models.user.all().fetch(100) 
            for records in result:
                print records+"|"+records+"\n"

application = webapp.WSGIApplication([
                                      (r'/user_auth/search_manager',search_user)]

def main():
  run_wsgi_app(application)

if __name__ == '__main__':
  main()

simple:

Apply the autocomplete to a class $

(".search_users").autocomplete(/search/search_manager);
like image 184
Abdul Kader Avatar answered Oct 06 '22 00:10

Abdul Kader