Ejemplo n.º 1
0
  def get(self):
    for (k,v) in self.request.GET.iteritems():
      logging.debug(k+","+str(v))

    user = users.get_current_user()
    
    samples = Sample.all().order("-timestamp")

    #display all the samples if the user isn't logged in or is admin
    if user and not users.is_current_user_admin():
      samples = samples.filter("user = "******"user = "******"timestamp <= ", samples[0].timestamp).filter("timestamp >= ", samples[-1].timestamp).fetch(1000)

    fun = []
    noisy = []

    for sample in samples:
      if sample.type == "Fun":
        fun.append(sample)
      else:
        noisy.append(sample)

    template_values = {'fun':fun, 'noisy':noisy, 'traces':traces, 'next':next, 'prev': prev, 'amount':amount}
    CustomHandler.get(self, os.path.dirname(__file__), template_values)
Ejemplo n.º 2
0
  def get(self):
    for (k,v) in self.request.GET.iteritems():
      logging.debug(k+","+str(v))

    user = users.get_current_user()

    #display all the traces if user is admin
    if users.is_current_user_admin():
      locations = LocationTrace.all()
    else:
      locations = LocationTrace.all().order('timestamp').filter("user = ", user)
    
    template_values = {'locations':locations}
    CustomHandler.get(self, os.path.dirname(__file__), template_values)
Ejemplo n.º 3
0
 def get(self):
   CustomHandler.get(self, os.path.dirname(__file__))