views:

15

answers:

1

this is my code:

class Marker_latlng(db.Model):
    geo_pt = db.GeoPtProperty()

class Marker_info(db.Model):
    info = db.StringProperty()
    marker_latlng =db.ReferenceProperty(Marker_latlng)

class BaseRequestHandler(webapp.RequestHandler):
    def render_template(self, filename, template_values={}):
        values={
        }
        template_values.update(values)
        path = os.path.join(os.path.dirname(__file__), 'templates', filename)
        self.response.out.write(template.render(path, template_values))



class HomePage(BaseRequestHandler):
    def get(self):
        q = Marker_latlng.all()
        q.filter("info =", "sss")

        self.render_template('3.1.html',{'datas':q})

and the 3.1.html is :

var marker_data=[];
{% for i in datas %}
    marker_data.push([{{db.Key(i.marker_latlng).geo_pt}}])
{% endfor %}

but the error is :

TemplateSyntaxError: Could not parse the remainder: (i.marker_latlng).geo_pt

so ,what can i do ?

thanks

A: 

Did you mean:

q = Marker_info.all() 
q.filter("info =", "sss")

?

Maybe try this:

marker_data.push([{{i.marker_latlng.geo_pt}}]) 

Or maybe:

marker_data.push([{{i.marker_latlng.geo_pt.lat}}, {{i.marker_latlng.geo_pt.lon}}]) 
Saxon Druce