def item(self, hit): return { 'url': self.hit_url(hit) , 'title': hit.title , 'location': hit.location , 'time': unix_timestamp(hit.time) , 'key': str(hit.key()) , 'added': datetime_format(hit.added) }
def item(self, hit): return { 'url': self.hit_url(hit), 'title': hit.title, 'location': hit.location, 'time': unix_timestamp(hit.time), 'key': str(hit.key()), 'added': datetime_format(hit.added) }
def get(self): user = users.get_current_user() type = self.get_value('type', required=False) type = self.map_type(type) self.render('priv/hit_list.html', { 'user': user, 'type': type, 'time': datetime_format(datetime.utcnow()) })
def get(self, key): hit = HIT.get(key) if hit: if hit.focal_time: focal_time = datetime_format(hit.focal_time) else: focal_time = None self.render('priv/hit_detail.html', { 'hit': hit , 'hit_group_url': hit_group_url(hit) , 'added': datetime_format(hit.added) , 'timestamp': json.dumps(unix_timestamp(hit.time)) , 'workers_url': json.dumps(self.hit_workers_url(hit)) , 'cancel_url': json.dumps(self.hit_cancel_url(hit)) , 'user': users.get_current_user() , 'focal_time': focal_time }) else: self.not_found()
def get(self, key): hit = HIT.get(key) if hit: if hit.focal_time: focal_time = datetime_format(hit.focal_time) else: focal_time = None self.render( 'priv/hit_detail.html', { 'hit': hit, 'hit_group_url': hit_group_url(hit), 'added': datetime_format(hit.added), 'timestamp': json.dumps(unix_timestamp(hit.time)), 'workers_url': json.dumps(self.hit_workers_url(hit)), 'cancel_url': json.dumps(self.hit_cancel_url(hit)), 'user': users.get_current_user(), 'focal_time': focal_time }) else: self.not_found()
def get(self): self.json(datetime_format(datetime.utcnow()))
def get(self): user = users.get_current_user() type = self.get_value('type', required=False) type = self.map_type(type) self.render('priv/hit_list.html', {'user': user, 'type': type, 'time': datetime_format(datetime.utcnow())})