def load(self): for key,val in request.params.items(): if key.startswith("view_"): start=int(key[5:]) startd=datetime.utcfromtimestamp(start) break rec,=meta.Session.query(Recording).filter(sa.and_( Recording.user==session['user'], Recording.start==startd)).all() session['showtrack']=load_recording(rec) session['showarea']='' session['showarea_id']='' session.save() redirect(h.url_for(controller='mapview',action="zoom",zoom='auto'))
def kml(self,starttime): if not 'user' in session: return None user=session['user'] print "Rpar:",request.params start=int(starttime) startd=datetime.utcfromtimestamp(start) rec,=meta.Session.query(Recording).filter(sa.and_( Recording.user==session['user'], Recording.start==startd)).all() c.rec=load_recording(rec) c.start=startd c.zip=zip response.content_type = 'application/octet-stream' response.charset="utf8" return render("/kml.mako")