google app engine - Implement reference field search feature using GAE/webapp2/Jinja2 -


i'm writing web application using googleappengine (gae), webapp2, jinja2 , twitter bootstrap. want manage objects may have location through web interface.

i've got following location model (models/location.py):

from google.appengine.ext import ndb  class location(ndb.model):     name = ndb.stringproperty(required=true)     description = ndb.textproperty(required=false)     address = ndb.stringproperty(required=false)     latitude = ndb.floatproperty(required=false)     longitude = ndb.floatproperty(required=false) 

i've got basic object model (models/object.py):

from google.appengine.ext import ndb google.appengine.ext.ndb import polymodel location import location  class object(polymodel.polymodel):     name = ndb.stringproperty(required=true)     description = ndb.textproperty(required=false)     location = ndb.keyproperty(kind=location, required=false)     position = ndb.stringproperty(required=false) 

i did create html template (templates/object-create.html) create new objects. far input field "location" looks following:

<div class="control-group">     <label class="control-label" for="inputlocation">location</label>     <div class="controls">         <input type="text" name="location" id="inputlocation" placeholder="location">     </div> </div> 

how make input field searchable? write location name or address. missing technology here? wtforms come in place?

-luca.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -