def get(self): self.auth() user = self.current_user() properties = ['name', 'email', 'phone', 'zip'] user_json = grab_json(user, properties) doRender(self, 'details.html', {'user': user, 'user_json': user_json})
def get(self): self.auth() user = self.current_user() properties = ['name', 'email', 'phone', 'zip'] user_json = grab_json(user, properties) doRender(self, 'details.html', { 'user': user, 'user_json': user_json })
def get(self, user_id): self.auth() user = self.current_user() properties = ['name', 'email', 'phone', 'zip', 'address', 'lat', 'lng'] user_json = grab_json(user, properties) if not user.key().id() == int(user_id): self.redirect('/user/' + user_id) return None else: doRender(self, 'edit_user.html', { 'user': user, 'user_json': user_json })
def get(self, event_id): self.auth() user = self.current_user() event = Event.get_by_id(int(event_id)) properties = ['name', 'date', 'time', 'details', 'location'] event_json = toolbox.grab_json(event, properties) event_json['date'] = toolbox.date_picker(event.date) toolbox.render(self, 'edit_event.html', { 'event': event, 'event_json': event_json, 'user': user })
def get(self, ride_id): self.auth() user = self.current_user() ride = Ride.get_by_id(int(ride_id)) if not ride or ride.driver == None: self.redirect('/rides') return None ride_json = grab_json(ride, self.properties) ride_json['date'] = toolbox.date_picker(ride.date) doRender(self, 'edit_ride.html', { 'user': user, 'ride': ride, 'ride_json': ride_json })
def get(self, circle_id): self.auth() user = self.current_user() circle = Circle.get_by_id(int(circle_id)) if not circle: self.redirect('/circles') properties = ['name', 'description', 'privacy', 'permission', 'color'] circle_json = grab_json(circle, properties) doRender(self, 'edit_circle.html', { 'user': user, 'circle': circle, 'circle_json': circle_json })